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

libavcodec/wmavoice.c:1504:49: Call
1502.     switch (frame_descs[bd_idx].fcb_type) {
1503.     case FCB_TYPE_SILENCE:
1504.         s->silence_gain = wmavoice_gain_silence[bitstream_read(bc, 8)];
                                                      ^
1505.         break;
1506.     case FCB_TYPE_AW_PULSES:

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] - 8):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 synth_frame(AVCodecContext *ctx, BitstreamContext *bc,\n                       int frame_idx, float *samples,\n                       const double *lsps, const double *prev_lsps,\n                       float *excitation, float *synth)\n{\n    WMAVoiceContext *s = ctx->priv_data;\n    int n, n_blocks_x2, log_n_blocks_x2, cur_pitch_val;\n    int pitch[MAX_BLOCKS], last_block_pitch;\n    int bd_idx = s->vbm_tree[bitstream_read_vlc(bc, frame_type_vlc.table, 6, 3)], block_nsamples;\n    if (bd_idx < 0) {\n        av_log(ctx, AV_LOG_ERROR,\n               "Invalid frame type VLC code, skipping\\n");\n        return AVERROR_INVALIDDATA;\n    }\n    block_nsamples = MAX_FRAMESIZE / frame_descs[bd_idx].n_blocks;\n    if (frame_descs[bd_idx].acb_type == ACB_TYPE_ASYMMETRIC) {\n        n_blocks_x2      = frame_descs[bd_idx].n_blocks << 1;\n        log_n_blocks_x2  = frame_descs[bd_idx].log_n_blocks + 1;\n        cur_pitch_val    = s->min_pitch_val + bitstream_read(bc, s->pitch_nbits);\n        cur_pitch_val    = FFMIN(cur_pitch_val, s->max_pitch_val - 1);\n        if (s->last_acb_type == ACB_TYPE_NONE ||\n            20 * abs(cur_pitch_val - s->last_pitch_val) >\n                (cur_pitch_val + s->last_pitch_val))\n            s->last_pitch_val = cur_pitch_val;\n        for (n = 0; n < frame_descs[bd_idx].n_blocks; n++) {\n            int fac = n * 2 + 1;\n            pitch[n] = (MUL16(fac,                 cur_pitch_val) +\n                        MUL16((n_blocks_x2 - fac), s->last_pitch_val) +\n                        frame_descs[bd_idx].n_blocks) >> log_n_blocks_x2;\n        }\n        s->pitch_diff_sh16 =\n            ((cur_pitch_val - s->last_pitch_val) << 16) / MAX_FRAMESIZE;\n    }\n    switch (frame_descs[bd_idx].fcb_type) {\n    case FCB_TYPE_SILENCE:\n        s->silence_gain = wmavoice_gain_silence[bitstream_read(bc, 8)];\n        break;\n    case FCB_TYPE_AW_PULSES:\n        aw_parse_coords(s, bc, pitch);\n        break;\n    }\n    for (n = 0; n < frame_descs[bd_idx].n_blocks; n++) {\n        int bl_pitch_sh2;\n        switch (frame_descs[bd_idx].acb_type) {\n        case ACB_TYPE_HAMMING: {\n            int block_pitch,\n                t1 = (s->block_conv_table[1] - s->block_conv_table[0]) << 2,\n                t2 = (s->block_conv_table[2] - s->block_conv_table[1]) << 1,\n                t3 =  s->block_conv_table[3] - s->block_conv_table[2] + 1;\n            if (n == 0) {\n                block_pitch = bitstream_read(bc, s->block_pitch_nbits);\n            } else\n                block_pitch = last_block_pitch - s->block_delta_pitch_hrange +\n                              bitstream_read(bc, s->block_delta_pitch_nbits);\n            last_block_pitch = av_clip(block_pitch,\n                                       s->block_delta_pitch_hrange,\n                                       s->block_pitch_range -\n                                           s->block_delta_pitch_hrange);\n            if (block_pitch < t1) {\n                bl_pitch_sh2 = (s->block_conv_table[0] << 2) + block_pitch;\n            } else {\n                block_pitch -= t1;\n                if (block_pitch < t2) {\n                    bl_pitch_sh2 =\n                        (s->block_conv_table[1] << 2) + (block_pitch << 1);\n                } else {\n                    block_pitch -= t2;\n                    if (block_pitch < t3) {\n                        bl_pitch_sh2 =\n                            (s->block_conv_table[2] + block_pitch) << 2;\n                    } else\n                        bl_pitch_sh2 = s->block_conv_table[3] << 2;\n                }\n            }\n            pitch[n] = bl_pitch_sh2 >> 2;\n            break;\n        }\n        case ACB_TYPE_ASYMMETRIC: {\n            bl_pitch_sh2 = pitch[n] << 2;\n            break;\n        }\n        default:\n            bl_pitch_sh2 = 0;\n            break;\n        }\n        synth_block(s, bc, n, block_nsamples, bl_pitch_sh2,\n                    lsps, prev_lsps, &frame_descs[bd_idx],\n                    &excitation[n * block_nsamples],\n                    &synth[n * block_nsamples]);\n    }\n    if (s->do_apf) {\n        double i_lsps[MAX_LSPS];\n        float lpcs[MAX_LSPS];\n        for (n = 0; n < s->lsps; n++)\n            i_lsps[n] = cos(0.5 * (prev_lsps[n] + lsps[n]));\n        ff_acelp_lspd2lpc(i_lsps, lpcs, s->lsps >> 1);\n        postfilter(s, synth, samples, 80, lpcs,\n                   &s->zero_exc_pf[s->history_nsamples + MAX_FRAMESIZE * frame_idx],\n                   frame_descs[bd_idx].fcb_type, pitch[0]);\n        for (n = 0; n < s->lsps; n++)\n            i_lsps[n] = cos(lsps[n]);\n        ff_acelp_lspd2lpc(i_lsps, lpcs, s->lsps >> 1);\n        postfilter(s, &synth[80], &samples[80], 80, lpcs,\n                   &s->zero_exc_pf[s->history_nsamples + MAX_FRAMESIZE * frame_idx + 80],\n                   frame_descs[bd_idx].fcb_type, pitch[0]);\n    } else\n        memcpy(samples, synth, 160 * sizeof(synth[0]));\n    s->frame_cntr++;\n    if (s->frame_cntr >= 0xFFFF) s->frame_cntr -= 0xFFFF;\n    s->last_acb_type = frame_descs[bd_idx].acb_type;\n    switch (frame_descs[bd_idx].acb_type) {\n    case ACB_TYPE_NONE:\n        s->last_pitch_val = 0;\n        break;\n    case ACB_TYPE_ASYMMETRIC:\n        s->last_pitch_val = cur_pitch_val;\n        break;\n    case ACB_TYPE_HAMMING:\n        s->last_pitch_val = pitch[frame_descs[bd_idx].n_blocks - 1];\n        break;\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}']