libavcodec/cook.c:914: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned32 by call to `joint_decode`.

libavcodec/cook.c:911:5: Call
909. 
910.     memset(q->decode_buffer_1, 0, sizeof(q->decode_buffer_1));
911.     decode_bytes_and_gain(q, p, inbuffer, &p->gains1);
         ^
912. 
913.     if (p->joint_stereo) {

libavcodec/cook.c:856:5: Call
  854.     bitstream_init(&q->bc, q->decoded_bytes_buffer + offset,
  855.                    p->bits_per_subpacket);
  856.     decode_gain_info(&q->bc, gains_ptr->now);
           ^
  857. 
  858.     /* Swap current and previous gains */

libavcodec/cook.c:344:45: Call
    342.     while (n--) {
    343.         int index = bitstream_read(bc, 3);
    344.         int gain = bitstream_read_bit(bc) ? bitstream_read(bc, 4) - 7 : -1;
                                                     ^
    345. 
    346.         while (i <= index)

libavcodec/bitstream.h:183:1: Parameter `bc->bits_left`
      181. 
      182. /* Return n bits from the buffer. n has to be in the 0-32 range. */
      183. static inline uint32_t bitstream_read(BitstreamContext *bc, unsigned n)
           ^
      184. {
      185.     if (!n)

libavcodec/cook.c:914:20: Call
912. 
913.     if (p->joint_stereo) {
914.         if ((res = joint_decode(q, p, q->decode_buffer_1, q->decode_buffer_2)) < 0)
                        ^
915.             return res;
916.     } else {

libavcodec/cook.c:794:1: Parameter `q->bc.bits_left`
  792.  * @param mlt_buffer2       pointer to right channel mlt coefficients
  793.  */
  794. static int joint_decode(COOKContext *q, COOKSubpacket *p,
       ^
  795.                         float *mlt_buffer_left, float *mlt_buffer_right)
  796. {

libavcodec/cook.c:809:5: Call
  807.     memset(mlt_buffer_left,  0, 1024 * sizeof(*mlt_buffer_left));
  808.     memset(mlt_buffer_right, 0, 1024 * sizeof(*mlt_buffer_right));
  809.     decouple_info(q, p, decouple_tab);
           ^
  810.     if ((res = mono_decode(q, p, decode_buffer)) < 0)
  811.         return res;

libavcodec/cook.c:739:1: Parameter `q->bc.bits_left`
    737.  * @param decouple_tab      decoupling array
    738.  */
    739. static void decouple_info(COOKContext *q, COOKSubpacket *p, int *decouple_tab)
         ^
    740. {
    741.     int i;

libavcodec/cook.c:742:18: Call
    740. {
    741.     int i;
    742.     int vlc    = bitstream_read_bit(&q->bc);
                          ^
    743.     int start  = cplband[p->js_subband_start];
    744.     int end    = cplband[p->subbands - 1];

libavcodec/bitstream.h:145:1: Parameter `bc->bits_left`
      143. 
      144. /* Return one bit from the buffer. */
      145. static inline unsigned bitstream_read_bit(BitstreamContext *bc)
           ^
      146. {
      147.     if (!bc->bits_left)

libavcodec/bitstream.h:150:12: Call
      148.         refill_64(bc);
      149. 
      150.     return get_val(bc, 1);
                      ^
      151. }
      152. 

libavcodec/bitstream.h:130:1: <LHS trace>
128. }
129. 
130. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
     ^
131. {
132. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:130:1: Parameter `bc->bits_left`
        128. }
        129. 
        130. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
             ^
        131. {
        132. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:130:1: <RHS trace>
128. }
129. 
130. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
     ^
131. {
132. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:130:1: Parameter `n`
        128. }
        129. 
        130. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
             ^
        131. {
        132. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:139:5: Binary operation: ([0, +oo] - 1):unsigned32 by call to `joint_decode` 
        137.     bc->bits <<= n;
        138. #endif
        139.     bc->bits_left -= n;
                 ^
        140. 
        141.     return ret;
