libavcodec/cook.c:1000: error: Buffer Overrun L1
  Offset: [-oo, -1] Size: 256 by call to `decode_subpacket`.

libavcodec/cook.c:968:5: Assignment
966.     int i, ret;
967.     int offset = 0;
968.     int chidx = 0;
         ^
969. 
970.     if (buf_size < avctx->block_align)

libavcodec/cook.c:998:9: Assignment
 996.     for(i=0;i<q->num_subpackets;i++){
 997.         q->subpacket[i].bits_per_subpacket = (q->subpacket[i].size*8)>>q->subpacket[i].bits_per_subpdiv;
 998.         q->subpacket[i].ch_idx = chidx;
              ^
 999.         av_log(avctx,AV_LOG_DEBUG,"subpacket[%i] size %i js %i %i block_align %i\n",i,q->subpacket[i].size,q->subpacket[i].joint_stereo,offset,avctx->block_align);
1000.         decode_subpacket(q, &q->subpacket[i], buf + offset, samples);

libavcodec/cook.c:1000:9: Call
 998.         q->subpacket[i].ch_idx = chidx;
 999.         av_log(avctx,AV_LOG_DEBUG,"subpacket[%i] size %i js %i %i block_align %i\n",i,q->subpacket[i].size,q->subpacket[i].joint_stereo,offset,avctx->block_align);
1000.         decode_subpacket(q, &q->subpacket[i], buf + offset, samples);
              ^
1001.         offset += q->subpacket[i].size;
1002.         chidx += q->subpacket[i].num_channels;

libavcodec/cook.c:914:1: Parameter `p->numvector_size`
  912.  * @param outbuffer         pointer to the outbuffer
  913.  */
  914. static void decode_subpacket(COOKContext *q, COOKSubpacket *p,
       ^
  915.                              const uint8_t *inbuffer, float *outbuffer)
  916. {

libavcodec/cook.c:929:9: Call
  927.         joint_decode(q, p, q->decode_buffer_1, q->decode_buffer_2);
  928.     } else {
  929.         mono_decode(q, p, q->decode_buffer_1);
               ^
  930. 
  931.         if (p->num_channels == 2) {

libavcodec/cook.c:631:1: Parameter `p->numvector_size`
    629.  */
    630. 
    631. static void mono_decode(COOKContext *q, COOKSubpacket *p, float* mlt_buffer) {
         ^
    632. 
    633.     int category_index[128];

libavcodec/cook.c:642:5: Call
    640.     decode_envelope(q, p, quant_index_table);
    641.     q->num_vectors = get_bits(&q->gb,p->log2_numvector_size);
    642.     categorize(q, p, quant_index_table, category, category_index);
             ^
    643.     expand_category(q, category, category_index);
    644.     decode_vectors(q, p, category, quant_index_table, mlt_buffer);

libavcodec/cook.c:396:1: <Offset trace>
394.  */
395. 
396. static void categorize(COOKContext *q, COOKSubpacket *p, int* quant_index_table,
     ^
397.                        int* category, int* category_index){
398.     int exp_idx, bias, tmpbias1, tmpbias2, bits_left, num_bits, index, v, i, j;

libavcodec/cook.c:396:1: Parameter `p->numvector_size`
      394.  */
      395. 
      396. static void categorize(COOKContext *q, COOKSubpacket *p, int* quant_index_table,
           ^
      397.                        int* category, int* category_index){
      398.     int exp_idx, bias, tmpbias1, tmpbias2, bits_left, num_bits, index, v, i, j;

libavcodec/cook.c:404:5: Assignment
      402.     int tmp_categorize_array[128*2];
      403.     int tmp_categorize_array1_idx=p->numvector_size;
      404.     int tmp_categorize_array2_idx=p->numvector_size;
               ^
      405. 
      406.     bits_left =  p->bits_per_subpacket - get_bits_count(&q->gb);

libavcodec/cook.c:396:1: <Length trace>
394.  */
395. 
396. static void categorize(COOKContext *q, COOKSubpacket *p, int* quant_index_table,
     ^
397.                        int* category, int* category_index){
398.     int exp_idx, bias, tmpbias1, tmpbias2, bits_left, num_bits, index, v, i, j;

libavcodec/cook.c:396:1: Array declaration
      394.  */
      395. 
      396. static void categorize(COOKContext *q, COOKSubpacket *p, int* quant_index_table,
           ^
      397.                        int* category, int* category_index){
      398.     int exp_idx, bias, tmpbias1, tmpbias2, bits_left, num_bits, index, v, i, j;

libavcodec/cook.c:475:13: Array access: Offset: [-oo, -1] Size: 256 by call to `decode_subpacket` 
      473.             }
      474.             if(index == -1)break;
      475.             tmp_categorize_array[--tmp_categorize_array2_idx] = index;
                       ^
      476.             tmpbias2 -= expbits_tab[exp_index2[index]] -
      477.                         expbits_tab[exp_index2[index]-1];
