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

libavcodec/cook.c:548:1: Parameter `(*q->sqvh[*].table)[*]`
546.  * @param subband_coef_sign     signs of coefficients
547.  */
548. static int unpack_SQVH(COOKContext *q, COOKSubpacket *p, int category,
     ^
549.                        int *subband_coef_index, int *subband_coef_sign)
550. {

libavcodec/cook.c:557:15: Call
555.     result = 0;
556.     for (i = 0; i < vpr_tab[category]; i++) {
557.         vlc = bitstream_read_vlc(&q->bc, q->sqvh[category].table, q->sqvh[category].bits, 3);
                   ^
558.         if (p->bits_per_subpacket < bitstream_tell(&q->bc)) {
559.             vlc = 0;

libavcodec/bitstream.h:313:1: Parameter `(*table)[*]`
  311.  * If the VLC code is invalid and max_depth > 1, then the number of bits removed
  312.  * is undefined. */
  313. static inline int bitstream_read_vlc(BitstreamContext *bc, VLC_TYPE (*table)[2],
       ^
  314.                                      int bits, int max_depth)
  315. {

libavcodec/bitstream.h:319:5: Assignment
  317.     unsigned idx = bitstream_peek(bc, bits);
  318.     int code = table[idx][0];
  319.     int n    = table[idx][1];
           ^
  320. 
  321.     if (max_depth > 1 && n < 0) {

libavcodec/bitstream.h:329:5: Call
  327.         }
  328.     }
  329.     skip_remaining(bc, n);
           ^
  330. 
  331.     return code;

libavcodec/bitstream.h:230:1: Parameter `n`
    228. }
    229. 
    230. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
         ^
    231. {
    232. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:237:5: Assignment
    235.     bc->bits <<= n;
    236. #endif
    237.     bc->bits_left -= n;
             ^
    238. }
    239. 

libavcodec/cook.c:570:53: Call
568.             if (subband_coef_index[i * vd + j]) {
569.                 if (bitstream_tell(&q->bc) < p->bits_per_subpacket) {
570.                     subband_coef_sign[i * vd + j] = bitstream_read_bit(&q->bc);
                                                         ^
571.                 } else {
572.                     result = 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 `bitstream_read_bit` 
    137.     bc->bits <<= n;
    138. #endif
    139.     bc->bits_left -= n;
             ^
    140. 
    141.     return ret;
