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

libavcodec/cook.c:596:1: Parameter `*category`
594.  * @param mlt_buffer        pointer to mlt coefficients
595.  */
596. static void decode_vectors(COOKContext *q, COOKSubpacket *p, int *category,
     ^
597.                            int *quant_index_table, float *mlt_buffer)
598. {

libavcodec/cook.c:611:17: Call
609.         index = category[band];
610.         if (category[band] < 7) {
611.             if (unpack_SQVH(q, p, category[band], subband_coef_index, subband_coef_sign)) {
                     ^
612.                 index = 7;
613.                 for (j = 0; j < p->total_subbands; j++)

libavcodec/cook.c:552:1: <Offset trace>
550.  * @param subband_coef_sign     signs of coefficients
551.  */
552. static int unpack_SQVH(COOKContext *q, COOKSubpacket *p, int category,
     ^
553.                        int *subband_coef_index, int *subband_coef_sign)
554. {

libavcodec/cook.c:552:1: Parameter `category`
  550.  * @param subband_coef_sign     signs of coefficients
  551.  */
  552. static int unpack_SQVH(COOKContext *q, COOKSubpacket *p, int category,
       ^
  553.                        int *subband_coef_index, int *subband_coef_sign)
  554. {

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:558:10: Array access: Offset: [min(7, *category), max(7, *category)] Size: 7 by call to `unpack_SQVH` 
  556.     int vlc, vd, tmp, result;
  557. 
  558.     vd = vd_tab[category];
                ^
  559.     result = 0;
  560.     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{\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++)\n                    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}', 'static int unpack_SQVH(COOKContext *q, COOKSubpacket *p, int category,\n                       int *subband_coef_index, int *subband_coef_sign)\n{\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}']