libavcodec/qdm2.c:372: error: Integer Overflow L2
  (32 - [0, `bc->bits_left` + 95]):unsigned32 by call to `bitstream_read`.

libavcodec/qdm2.c:364:1: Parameter `(*vlc->table)[*]`
362. }
363. 
364. static int qdm2_get_vlc(BitstreamContext *bc, VLC *vlc, int flag, int depth)
     ^
365. {
366.     int value;

libavcodec/qdm2.c:368:13: Call
366.     int value;
367. 
368.     value = bitstream_read_vlc(bc, vlc->table, vlc->bits, depth);
                 ^
369. 
370.     /* stage-2, 3 bits exponent escape sequence */

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/qdm2.c:372:36: Call
370.     /* stage-2, 3 bits exponent escape sequence */
371.     if (value-- == 0)
372.         value = bitstream_read(bc, bitstream_read(bc, 3) + 1);
                                        ^
373. 
374.     /* stage-3, optional */

libavcodec/bitstream.h:183:1: Parameter `n`
  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/bitstream.h:189:9: Call
  187. 
  188.     if (n > bc->bits_left) {
  189.         refill_32(bc);
               ^
  190.         if (bc->bits_left < 32)
  191.             bc->bits_left = n;

libavcodec/bitstream.h:60:1: <RHS trace>
58. }
59. 
60. static inline void refill_32(BitstreamContext *bc)
    ^
61. {
62.     if (bc->ptr >= bc->buffer_end)

libavcodec/bitstream.h:60:1: Parameter `bc->bits_left`
    58. }
    59. 
    60. static inline void refill_32(BitstreamContext *bc)
        ^
    61. {
    62.     if (bc->ptr >= bc->buffer_end)

libavcodec/bitstream.h:68:5: Binary operation: (32 - [0, bc->bits_left + 95]):unsigned32 by call to `bitstream_read` 
    66.     bc->bits       = (uint64_t)AV_RL32(bc->ptr) << bc->bits_left | bc->bits;
    67. #else
    68.     bc->bits       = bc->bits | (uint64_t)AV_RB32(bc->ptr) << (32 - bc->bits_left);
            ^
    69. #endif
    70.     bc->ptr       += 4;

static inline void refill_32(BitstreamContext *bc)
{
    if (bc->ptr >= bc->buffer_end)
        return;
#ifdef BITSTREAM_READER_LE
    bc->bits       = (uint64_t)AV_RL32(bc->ptr) << bc->bits_left | bc->bits;
#else
    bc->bits       = bc->bits | (uint64_t)AV_RB32(bc->ptr) << (32 - bc->bits_left);
#endif
    bc->ptr       += 4;
    bc->bits_left += 32;
}
['static int qdm2_get_vlc(BitstreamContext *bc, VLC *vlc, int flag, int depth)\n{\n    int value;\n    value = bitstream_read_vlc(bc, vlc->table, vlc->bits, depth);\n    if (value-- == 0)\n        value = bitstream_read(bc, bitstream_read(bc, 3) + 1);\n    if (flag) {\n        int tmp = vlc_stage3_values[value];\n        if ((value & ~3) > 0)\n            tmp += bitstream_read(bc, value >> 2);\n        value = tmp;\n    }\n    return value;\n}', 'static inline int bitstream_read_vlc(BitstreamContext *bc, VLC_TYPE (*table)[2],\n                                     int bits, int max_depth)\n{\n    int nb_bits;\n    unsigned idx = bitstream_peek(bc, bits);\n    int code = table[idx][0];\n    int n    = table[idx][1];\n    if (max_depth > 1 && n < 0) {\n        skip_remaining(bc, bits);\n        code = set_idx(bc, code, &n, &nb_bits, table);\n        if (max_depth > 2 && n < 0) {\n            skip_remaining(bc, nb_bits);\n            code = set_idx(bc, code, &n, &nb_bits, table);\n        }\n    }\n    skip_remaining(bc, n);\n    return code;\n}', 'static inline void skip_remaining(BitstreamContext *bc, unsigned n)\n{\n#ifdef BITSTREAM_READER_LE\n    bc->bits >>= n;\n#else\n    bc->bits <<= n;\n#endif\n    bc->bits_left -= n;\n}', 'static inline uint32_t bitstream_read(BitstreamContext *bc, unsigned n)\n{\n    if (!n)\n        return 0;\n    if (n > bc->bits_left) {\n        refill_32(bc);\n        if (bc->bits_left < 32)\n            bc->bits_left = n;\n    }\n    return get_val(bc, n);\n}', 'static inline void refill_32(BitstreamContext *bc)\n{\n    if (bc->ptr >= bc->buffer_end)\n        return;\n#ifdef BITSTREAM_READER_LE\n    bc->bits       = (uint64_t)AV_RL32(bc->ptr) << bc->bits_left | bc->bits;\n#else\n    bc->bits       = bc->bits | (uint64_t)AV_RB32(bc->ptr) << (32 - bc->bits_left);\n#endif\n    bc->ptr       += 4;\n    bc->bits_left += 32;\n}']