libavcodec/cook.c:632: error: Buffer Overrun L2
  Offset: [min(7, `*category`), max(7, `*category`)] Size: 7 by call to `unpack_SQVH`.

libavcodec/cook.c:618:1: Parameter `*category`
616. 
617. 
618. static void decode_vectors(COOKContext* q, COOKSubpacket* p, int* category,
     ^
619.                            int *quant_index_table, float* mlt_buffer){
620.     /* A zero in this table means that the subband coefficient is

libavcodec/cook.c:632:16: Call
630.         index = category[band];
631.         if(category[band] < 7){
632.             if(unpack_SQVH(q, p, category[band], subband_coef_index, subband_coef_sign)){
                    ^
633.                 index=7;
634.                 for(j=0 ; j<p->total_subbands ; j++) category[band+j]=7;

libavcodec/cook.c:573:1: <Offset trace>
571.  */
572. 
573. static int unpack_SQVH(COOKContext *q, COOKSubpacket *p, int category, int* subband_coef_index,
     ^
574.                        int* subband_coef_sign) {
575.     int i,j;

libavcodec/cook.c:573:1: Parameter `category`
  571.  */
  572. 
  573. static int unpack_SQVH(COOKContext *q, COOKSubpacket *p, int category, int* subband_coef_index,
       ^
  574.                        int* subband_coef_sign) {
  575.     int i,j;

libavcodec/cookdata.h:61:1: <Length trace>
59. };
60. 
61. static const int vd_tab[7] = {
    ^
62.     2, 2, 2, 4, 4, 5, 5,
63. };

libavcodec/cookdata.h:61:1: Array declaration
  59. };
  60. 
  61. static const int vd_tab[7] = {
      ^
  62.     2, 2, 2, 4, 4, 5, 5,
  63. };

libavcodec/cook.c:578:10: Array access: Offset: [min(7, *category), max(7, *category)] Size: 7 by call to `unpack_SQVH` 
  576.     int vlc, vd ,tmp, result;
  577. 
  578.     vd = vd_tab[category];
                ^
  579.     result = 0;
  580.     for(i=0 ; i<vpr_tab[category] ; i++){

static int unpack_SQVH(COOKContext *q, COOKSubpacket *p, int category, int* subband_coef_index,
                       int* subband_coef_sign) {
    int i,j;
    int vlc, vd ,tmp, result;
    vd = vd_tab[category];
    result = 0;
    for(i=0 ; i<vpr_tab[category] ; i++){
        vlc = get_vlc2(&q->gb, q->sqvh[category].table, q->sqvh[category].bits, 3);
        if (p->bits_per_subpacket < get_bits_count(&q->gb)){
            vlc = 0;
            result = 1;
        }
        for(j=vd-1 ; j>=0 ; j--){
            tmp = (vlc * invradix_tab[category])/0x100000;
            subband_coef_index[vd*i+j] = vlc - tmp * (kmax_tab[category]+1);
            vlc = tmp;
        }
        for(j=0 ; j<vd ; j++){
            if (subband_coef_index[i*vd + j]) {
                if(get_bits_count(&q->gb) < p->bits_per_subpacket){
                    subband_coef_sign[i*vd+j] = get_bits1(&q->gb);
                } else {
                    result=1;
                    subband_coef_sign[i*vd+j]=0;
                }
            } else {
                subband_coef_sign[i*vd+j]=0;
            }
        }
    }
    return result;
}
['static void decode_vectors(COOKContext* q, COOKSubpacket* p, int* category,\n                           int *quant_index_table, float* mlt_buffer){\n    int subband_coef_index[SUBBAND_SIZE];\n    int subband_coef_sign[SUBBAND_SIZE];\n    int band, j;\n    int index=0;\n    for(band=0 ; band<p->total_subbands ; band++){\n        index = category[band];\n        if(category[band] < 7){\n            if(unpack_SQVH(q, p, category[band], subband_coef_index, subband_coef_sign)){\n                index=7;\n                for(j=0 ; j<p->total_subbands ; j++) category[band+j]=7;\n            }\n        }\n        if(index>=7) {\n            memset(subband_coef_index, 0, sizeof(subband_coef_index));\n            memset(subband_coef_sign, 0, sizeof(subband_coef_sign));\n        }\n        q->scalar_dequant(q, index, quant_index_table[band],\n                          subband_coef_index, subband_coef_sign,\n                          &mlt_buffer[band * SUBBAND_SIZE]);\n    }\n    if(p->total_subbands*SUBBAND_SIZE >= q->samples_per_channel){\n        return;\n    }\n}', 'static int unpack_SQVH(COOKContext *q, COOKSubpacket *p, int category, int* subband_coef_index,\n                       int* subband_coef_sign) {\n    int i,j;\n    int vlc, vd ,tmp, result;\n    vd = vd_tab[category];\n    result = 0;\n    for(i=0 ; i<vpr_tab[category] ; i++){\n        vlc = get_vlc2(&q->gb, q->sqvh[category].table, q->sqvh[category].bits, 3);\n        if (p->bits_per_subpacket < get_bits_count(&q->gb)){\n            vlc = 0;\n            result = 1;\n        }\n        for(j=vd-1 ; j>=0 ; j--){\n            tmp = (vlc * invradix_tab[category])/0x100000;\n            subband_coef_index[vd*i+j] = vlc - tmp * (kmax_tab[category]+1);\n            vlc = tmp;\n        }\n        for(j=0 ; j<vd ; j++){\n            if (subband_coef_index[i*vd + j]) {\n                if(get_bits_count(&q->gb) < p->bits_per_subpacket){\n                    subband_coef_sign[i*vd+j] = get_bits1(&q->gb);\n                } else {\n                    result=1;\n                    subband_coef_sign[i*vd+j]=0;\n                }\n            } else {\n                subband_coef_sign[i*vd+j]=0;\n            }\n        }\n    }\n    return result;\n}']