libavcodec/g723_1dec.c:155: error: Integer Overflow L2
  ([1, +oo] - 14):unsigned32 by call to `bitstream_read`.

libavcodec/g723_1dec.c:155:36: Call
153.                                    bitstream_read(&bc, 16);
154.         p->subframe[1].pulse_pos = (p->subframe[1].pulse_pos << 14) +
155.                                    bitstream_read(&bc, 14);
                                        ^
156.         p->subframe[2].pulse_pos = (p->subframe[2].pulse_pos << 16) +
157.                                    bitstream_read(&bc, 16);

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:194:12: Call
  192.     }
  193. 
  194.     return get_val(bc, n);
                  ^
  195. }
  196. 

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: ([1, +oo] - 14):unsigned32 by call to `bitstream_read` 
    137.     bc->bits <<= n;
    138. #endif
    139.     bc->bits_left -= n;
             ^
    140. 
    141.     return ret;

static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
{
#ifdef BITSTREAM_READER_LE
    uint64_t ret = bc->bits & ((UINT64_C(1) << n) - 1);
    bc->bits >>= n;
#else
    uint64_t ret = bc->bits >> (64 - n);
    bc->bits <<= n;
#endif
    bc->bits_left -= n;
    return ret;
}
['static int unpack_bitstream(G723_1_Context *p, const uint8_t *buf,\n                            int buf_size)\n{\n    BitstreamContext bc;\n    int ad_cb_len;\n    int temp, info_bits, i;\n    bitstream_init(&bc, buf, buf_size * 8);\n    info_bits = bitstream_read(&bc, 2);\n    if (info_bits == 3) {\n        p->cur_frame_type = UNTRANSMITTED_FRAME;\n        return 0;\n    }\n    p->lsp_index[2] = bitstream_read(&bc, 8);\n    p->lsp_index[1] = bitstream_read(&bc, 8);\n    p->lsp_index[0] = bitstream_read(&bc, 8);\n    if (info_bits == 2) {\n        p->cur_frame_type = SID_FRAME;\n        p->subframe[0].amp_index = bitstream_read(&bc, 6);\n        return 0;\n    }\n    p->cur_rate       = info_bits ? RATE_5300 : RATE_6300;\n    p->cur_frame_type = ACTIVE_FRAME;\n    p->pitch_lag[0] = bitstream_read(&bc, 7);\n    if (p->pitch_lag[0] > 123)\n        return -1;\n    p->pitch_lag[0] += PITCH_MIN;\n    p->subframe[1].ad_cb_lag = bitstream_read(&bc, 2);\n    p->pitch_lag[1] = bitstream_read(&bc, 7);\n    if (p->pitch_lag[1] > 123)\n        return -1;\n    p->pitch_lag[1] += PITCH_MIN;\n    p->subframe[3].ad_cb_lag = bitstream_read(&bc, 2);\n    p->subframe[0].ad_cb_lag = 1;\n    p->subframe[2].ad_cb_lag = 1;\n    for (i = 0; i < SUBFRAMES; i++) {\n        temp = bitstream_read(&bc, 12);\n        ad_cb_len = 170;\n        p->subframe[i].dirac_train = 0;\n        if (p->cur_rate == RATE_6300 && p->pitch_lag[i >> 1] < SUBFRAME_LEN - 2) {\n            p->subframe[i].dirac_train = temp >> 11;\n            temp &= 0x7FF;\n            ad_cb_len = 85;\n        }\n        p->subframe[i].ad_cb_gain = FASTDIV(temp, GAIN_LEVELS);\n        if (p->subframe[i].ad_cb_gain < ad_cb_len) {\n            p->subframe[i].amp_index = temp - p->subframe[i].ad_cb_gain *\n                                       GAIN_LEVELS;\n        } else {\n            return -1;\n        }\n    }\n    p->subframe[0].grid_index = bitstream_read(&bc, 1);\n    p->subframe[1].grid_index = bitstream_read(&bc, 1);\n    p->subframe[2].grid_index = bitstream_read(&bc, 1);\n    p->subframe[3].grid_index = bitstream_read(&bc, 1);\n    if (p->cur_rate == RATE_6300) {\n        bitstream_skip(&bc, 1);\n        temp = bitstream_read(&bc, 13);\n        p->subframe[0].pulse_pos = temp / 810;\n        temp -= p->subframe[0].pulse_pos * 810;\n        p->subframe[1].pulse_pos = FASTDIV(temp, 90);\n        temp -= p->subframe[1].pulse_pos * 90;\n        p->subframe[2].pulse_pos = FASTDIV(temp, 9);\n        p->subframe[3].pulse_pos = temp - p->subframe[2].pulse_pos * 9;\n        p->subframe[0].pulse_pos = (p->subframe[0].pulse_pos << 16) +\n                                   bitstream_read(&bc, 16);\n        p->subframe[1].pulse_pos = (p->subframe[1].pulse_pos << 14) +\n                                   bitstream_read(&bc, 14);\n        p->subframe[2].pulse_pos = (p->subframe[2].pulse_pos << 16) +\n                                   bitstream_read(&bc, 16);\n        p->subframe[3].pulse_pos = (p->subframe[3].pulse_pos << 14) +\n                                   bitstream_read(&bc, 14);\n        p->subframe[0].pulse_sign = bitstream_read(&bc, 6);\n        p->subframe[1].pulse_sign = bitstream_read(&bc, 5);\n        p->subframe[2].pulse_sign = bitstream_read(&bc, 6);\n        p->subframe[3].pulse_sign = bitstream_read(&bc, 5);\n    } else {\n        p->subframe[0].pulse_pos  = bitstream_read(&bc, 12);\n        p->subframe[1].pulse_pos  = bitstream_read(&bc, 12);\n        p->subframe[2].pulse_pos  = bitstream_read(&bc, 12);\n        p->subframe[3].pulse_pos  = bitstream_read(&bc, 12);\n        p->subframe[0].pulse_sign = bitstream_read(&bc, 4);\n        p->subframe[1].pulse_sign = bitstream_read(&bc, 4);\n        p->subframe[2].pulse_sign = bitstream_read(&bc, 4);\n        p->subframe[3].pulse_sign = bitstream_read(&bc, 4);\n    }\n    return 0;\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 uint64_t get_val(BitstreamContext *bc, unsigned n)\n{\n#ifdef BITSTREAM_READER_LE\n    uint64_t ret = bc->bits & ((UINT64_C(1) << n) - 1);\n    bc->bits >>= n;\n#else\n    uint64_t ret = bc->bits >> (64 - n);\n    bc->bits <<= n;\n#endif\n    bc->bits_left -= n;\n    return ret;\n}']