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

libavcodec/cook.c:1003:5: Assignment
1001.     int i;
1002.     int offset = 0;
1003.     int chidx = 0;
          ^
1004. 
1005.     if (buf_size < avctx->block_align)

libavcodec/cook.c:1024:9: Assignment
1022.     for(i=0;i<q->num_subpackets;i++){
1023.         q->subpacket[i].bits_per_subpacket = (q->subpacket[i].size*8)>>q->subpacket[i].bits_per_subpdiv;
1024.         q->subpacket[i].ch_idx = chidx;
              ^
1025.         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);
1026.         decode_subpacket(q, &q->subpacket[i], buf + offset, (int16_t*)data);

libavcodec/cook.c:1026:9: Call
1024.         q->subpacket[i].ch_idx = chidx;
1025.         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);
1026.         decode_subpacket(q, &q->subpacket[i], buf + offset, (int16_t*)data);
              ^
1027.         offset += q->subpacket[i].size;
1028.         chidx += q->subpacket[i].num_channels;

libavcodec/cook.c:952:1: Parameter `p->numvector_size`
  950. 
  951. 
  952. static void decode_subpacket(COOKContext *q, COOKSubpacket* p, const uint8_t *inbuffer, int16_t *outbuffer) {
       ^
  953.     int sub_packet_size = p->size;
  954.     /* packet dump */

libavcodec/cook.c:965:9: Call
  963.         joint_decode(q, p, q->decode_buffer_1, q->decode_buffer_2);
  964.     } else {
  965.         mono_decode(q, p, q->decode_buffer_1);
               ^
  966. 
  967.         if (p->num_channels == 2) {

libavcodec/cook.c:659:1: Parameter `p->numvector_size`
    657.  */
    658. 
    659. static void mono_decode(COOKContext *q, COOKSubpacket *p, float* mlt_buffer) {
         ^
    660. 
    661.     int category_index[128];

libavcodec/cook.c:670:5: Call
    668.     decode_envelope(q, p, quant_index_table);
    669.     q->num_vectors = get_bits(&q->gb,p->log2_numvector_size);
    670.     categorize(q, p, quant_index_table, category, category_index);
             ^
    671.     expand_category(q, category, category_index);
    672.     decode_vectors(q, p, category, quant_index_table, mlt_buffer);

libavcodec/cook.c:424:1: <Offset trace>
422.  */
423. 
424. static void categorize(COOKContext *q, COOKSubpacket *p, int* quant_index_table,
     ^
425.                        int* category, int* category_index){
426.     int exp_idx, bias, tmpbias1, tmpbias2, bits_left, num_bits, index, v, i, j;

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

libavcodec/cook.c:432:5: Assignment
      430.     int tmp_categorize_array[128*2];
      431.     int tmp_categorize_array1_idx=p->numvector_size;
      432.     int tmp_categorize_array2_idx=p->numvector_size;
               ^
      433. 
      434.     bits_left =  p->bits_per_subpacket - get_bits_count(&q->gb);

libavcodec/cook.c:424:1: <Length trace>
422.  */
423. 
424. static void categorize(COOKContext *q, COOKSubpacket *p, int* quant_index_table,
     ^
425.                        int* category, int* category_index){
426.     int exp_idx, bias, tmpbias1, tmpbias2, bits_left, num_bits, index, v, i, j;

libavcodec/cook.c:424:1: Array declaration
      422.  */
      423. 
      424. static void categorize(COOKContext *q, COOKSubpacket *p, int* quant_index_table,
           ^
      425.                        int* category, int* category_index){
      426.     int exp_idx, bias, tmpbias1, tmpbias2, bits_left, num_bits, index, v, i, j;

libavcodec/cook.c:503:13: Array access: Offset: [-oo, -1] Size: 256 by call to `decode_subpacket` 
      501.             }
      502.             if(index == -1)break;
      503.             tmp_categorize_array[--tmp_categorize_array2_idx] = index;
                       ^
      504.             tmpbias2 -= expbits_tab[exp_index2[index]] -
      505.                         expbits_tab[exp_index2[index]-1];
