libavcodec/cook.c:1000: error: Buffer Overrun L1
  Offset: -1 Size: 51 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->subbands`
  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:927:9: Call
  925. 
  926.     if (p->joint_stereo) {
  927.         joint_decode(q, p, q->decode_buffer_1, q->decode_buffer_2);
               ^
  928.     } else {
  929.         mono_decode(q, p, q->decode_buffer_1);

libavcodec/cook.c:801:1: Parameter `p->subbands`
    799.  */
    800. 
    801. static void joint_decode(COOKContext *q, COOKSubpacket *p, float* mlt_buffer1,
         ^
    802.                          float* mlt_buffer2) {
    803.     int i,j;

libavcodec/cook.c:816:5: Call
    814.     memset(mlt_buffer1, 0, 1024 * sizeof(*mlt_buffer1));
    815.     memset(mlt_buffer2, 0, 1024 * sizeof(*mlt_buffer2));
    816.     decouple_info(q, p, decouple_tab);
             ^
    817.     mono_decode(q, p, decode_buffer);
    818. 

libavcodec/cook.c:747:1: <Offset trace>
745.  *
746.  */
747. static void decouple_info(COOKContext *q, COOKSubpacket *p, int *decouple_tab)
     ^
748. {
749.     int i;

libavcodec/cook.c:747:1: Parameter `p->subbands`
      745.  *
      746.  */
      747. static void decouple_info(COOKContext *q, COOKSubpacket *p, int *decouple_tab)
           ^
      748. {
      749.     int i;

libavcodec/cookdata.h:504:1: <Length trace>
502. //Coupling tables
503. 
504. static const int cplband[51] = {
     ^
505.     0,1,2,3,4,5,6,7,8,9,
506.     10,11,11,12,12,13,13,14,14,14,

libavcodec/cookdata.h:504:1: Array declaration
      502. //Coupling tables
      503. 
      504. static const int cplband[51] = {
           ^
      505.     0,1,2,3,4,5,6,7,8,9,
      506.     10,11,11,12,12,13,13,14,14,14,

libavcodec/cook.c:752:18: Array access: Offset: -1 Size: 51 by call to `decode_subpacket` 
      750.     int vlc    = get_bits1(&q->gb);
      751.     int start  = cplband[p->js_subband_start];
      752.     int end    = cplband[p->subbands-1];
                            ^
      753.     int length = end - start + 1;
      754. 
