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

libavcodec/wmavoice.c:1299:13: Call
1297.     if (frame_desc->fcb_type == FCB_TYPE_AW_PULSES) {
1298.         aw_pulse_set1(s, bc, block_idx, &fcb);
1299.         if (aw_pulse_set2(s, bc, block_idx, &fcb)) {
                  ^
1300.             /* Conceal the block with silence and return.
1301.              * Skip the correct amount of bits to read the next

libavcodec/wmavoice.c:1110:31: Assignment
  1108. 
  1109.     /* find the 'aidx'th offset that is not excluded */
  1110.     aidx = bitstream_read(bc, s->aw_n_pulses[0] > 0 ? 5 - 2 * block_idx : 4);
                                      ^
  1111.     for (n = 0; n <= aidx; pulse_start++) {
  1112.         for (idx = pulse_start; idx < 0; idx += fcb->pitch_lag) ;

libavcodec/wmavoice.c:1110:12: Call
  1108. 
  1109.     /* find the 'aidx'th offset that is not excluded */
  1110.     aidx = bitstream_read(bc, s->aw_n_pulses[0] > 0 ? 5 - 2 * block_idx : 4);
                   ^
  1111.     for (n = 0; n <= aidx; pulse_start++) {
  1112.         for (idx = pulse_start; idx < 0; idx += fcb->pitch_lag) ;

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/wmavoice.c:1308:13: Call
1306.                 excitation[n] =
1307.                     wmavoice_std_codebook[r_idx + n] * s->silence_gain;
1308.             bitstream_skip(bc, 7 + 1);
                  ^
1309.             return;
1310.         }

libavcodec/bitstream.h:241:1: Parameter `n`
  239. 
  240. /* Skip n bits in the buffer. */
  241. static inline void bitstream_skip(BitstreamContext *bc, unsigned n)
       ^
  242. {
  243.     if (n <= bc->bits_left)

libavcodec/bitstream.h:244:9: Call
  242. {
  243.     if (n <= bc->bits_left)
  244.         skip_remaining(bc, n);
               ^
  245.     else {
  246.         n -= bc->bits_left;

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

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

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

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: Binary operation: ([0, +oo] - 8):unsigned32 by call to `bitstream_skip` 
    235.     bc->bits <<= n;
    236. #endif
    237.     bc->bits_left -= n;
             ^
    238. }
    239. 

static inline void skip_remaining(BitstreamContext *bc, unsigned n)
{
#ifdef BITSTREAM_READER_LE
    bc->bits >>= n;
#else
    bc->bits <<= n;
#endif
    bc->bits_left -= n;
}
['static void synth_block_fcb_acb(WMAVoiceContext *s, BitstreamContext *bc,\n                                int block_idx, int size,\n                                int block_pitch_sh2,\n                                const struct frame_type_desc *frame_desc,\n                                float *excitation)\n{\n    static const float gain_coeff[6] = {\n        0.8169, -0.06545, 0.1726, 0.0185, -0.0359, 0.0458\n    };\n    float pulses[MAX_FRAMESIZE / 2], pred_err, acb_gain, fcb_gain;\n    int n, idx, gain_weight;\n    AMRFixed fcb;\n    assert(size <= MAX_FRAMESIZE / 2);\n    memset(pulses, 0, sizeof(*pulses) * size);\n    fcb.pitch_lag      = block_pitch_sh2 >> 2;\n    fcb.pitch_fac      = 1.0;\n    fcb.no_repeat_mask = 0;\n    fcb.n              = 0;\n    if (frame_desc->fcb_type == FCB_TYPE_AW_PULSES) {\n        aw_pulse_set1(s, bc, block_idx, &fcb);\n        if (aw_pulse_set2(s, bc, block_idx, &fcb)) {\n            int r_idx = pRNG(s->frame_cntr, block_idx, size);\n            for (n = 0; n < size; n++)\n                excitation[n] =\n                    wmavoice_std_codebook[r_idx + n] * s->silence_gain;\n            bitstream_skip(bc, 7 + 1);\n            return;\n        }\n    } else   {\n        int offset_nbits = 5 - frame_desc->log_n_blocks;\n        fcb.no_repeat_mask = -1;\n        for (n = 0; n < 5; n++) {\n            float sign;\n            int pos1, pos2;\n            sign           = bitstream_read_bit(bc) ? 1.0 : -1.0;\n            pos1           = bitstream_read(bc, offset_nbits);\n            fcb.x[fcb.n]   = n + 5 * pos1;\n            fcb.y[fcb.n++] = sign;\n            if (n < frame_desc->dbl_pulses) {\n                pos2           = bitstream_read(bc, offset_nbits);\n                fcb.x[fcb.n]   = n + 5 * pos2;\n                fcb.y[fcb.n++] = (pos1 < pos2) ? -sign : sign;\n            }\n        }\n    }\n    ff_set_fixed_vector(pulses, &fcb, 1.0, size);\n    idx = bitstream_read(bc, 7);\n    fcb_gain = expf(avpriv_scalarproduct_float_c(s->gain_pred_err,\n                                                 gain_coeff, 6) -\n                    5.2409161640 + wmavoice_gain_codebook_fcb[idx]);\n    acb_gain = wmavoice_gain_codebook_acb[idx];\n    pred_err = av_clipf(wmavoice_gain_codebook_fcb[idx],\n                        -2.9957322736  ,\n                         1.6094379124  );\n    gain_weight = 8 >> frame_desc->log_n_blocks;\n    memmove(&s->gain_pred_err[gain_weight], s->gain_pred_err,\n            sizeof(*s->gain_pred_err) * (6 - gain_weight));\n    for (n = 0; n < gain_weight; n++)\n        s->gain_pred_err[n] = pred_err;\n    if (frame_desc->acb_type == ACB_TYPE_ASYMMETRIC) {\n        int len;\n        for (n = 0; n < size; n += len) {\n            int next_idx_sh16;\n            int abs_idx    = block_idx * size + n;\n            int pitch_sh16 = (s->last_pitch_val << 16) +\n                             s->pitch_diff_sh16 * abs_idx;\n            int pitch      = (pitch_sh16 + 0x6FFF) >> 16;\n            int idx_sh16   = ((pitch << 16) - pitch_sh16) * 8 + 0x58000;\n            idx            = idx_sh16 >> 16;\n            if (s->pitch_diff_sh16) {\n                if (s->pitch_diff_sh16 > 0) {\n                    next_idx_sh16 = (idx_sh16) &~ 0xFFFF;\n                } else\n                    next_idx_sh16 = (idx_sh16 + 0x10000) &~ 0xFFFF;\n                len = av_clip((idx_sh16 - next_idx_sh16) / s->pitch_diff_sh16 / 8,\n                              1, size - n);\n            } else\n                len = size;\n            ff_acelp_interpolatef(&excitation[n], &excitation[n - pitch],\n                                  wmavoice_ipol1_coeffs, 17,\n                                  idx, 9, len);\n        }\n    } else   {\n        int block_pitch = block_pitch_sh2 >> 2;\n        idx             = block_pitch_sh2 & 3;\n        if (idx) {\n            ff_acelp_interpolatef(excitation, &excitation[-block_pitch],\n                                  wmavoice_ipol2_coeffs, 4,\n                                  idx, 8, size);\n        } else\n            av_memcpy_backptr((uint8_t *) excitation, sizeof(float) * block_pitch,\n                              sizeof(float) * size);\n    }\n    ff_weighted_vector_sumf(excitation, excitation, pulses,\n                            acb_gain, fcb_gain, size);\n}', 'static int aw_pulse_set2(WMAVoiceContext *s, BitstreamContext *bc,\n                         int block_idx, AMRFixed *fcb)\n{\n    uint16_t use_mask_mem[9];\n    uint16_t *use_mask = use_mask_mem + 2;\n    int pulse_off = s->aw_first_pulse_off[block_idx],\n        pulse_start, n, idx, range, aidx, start_off = 0;\n    if (s->aw_n_pulses[block_idx] > 0)\n        while (pulse_off + s->aw_pulse_range < 1)\n            pulse_off += fcb->pitch_lag;\n    if (s->aw_n_pulses[0] > 0) {\n        if (block_idx == 0) {\n            range = 32;\n        } else   {\n            range = 8;\n            if (s->aw_n_pulses[block_idx] > 0)\n                pulse_off = s->aw_next_pulse_off_cache;\n        }\n    } else\n        range = 16;\n    pulse_start = s->aw_n_pulses[block_idx] > 0 ? pulse_off - range / 2 : 0;\n    memset(&use_mask[-2], 0, 2 * sizeof(use_mask[0]));\n    memset( use_mask,   -1, 5 * sizeof(use_mask[0]));\n    memset(&use_mask[5], 0, 2 * sizeof(use_mask[0]));\n    if (s->aw_n_pulses[block_idx] > 0)\n        for (idx = pulse_off; idx < MAX_FRAMESIZE / 2; idx += fcb->pitch_lag) {\n            int excl_range         = s->aw_pulse_range;\n            uint16_t *use_mask_ptr = &use_mask[idx >> 4];\n            int first_sh           = 16 - (idx & 15);\n            *use_mask_ptr++       &= 0xFFFFu << first_sh;\n            excl_range            -= first_sh;\n            if (excl_range >= 16) {\n                *use_mask_ptr++    = 0;\n                *use_mask_ptr     &= 0xFFFF >> (excl_range - 16);\n            } else\n                *use_mask_ptr     &= 0xFFFF >> excl_range;\n        }\n    aidx = bitstream_read(bc, s->aw_n_pulses[0] > 0 ? 5 - 2 * block_idx : 4);\n    for (n = 0; n <= aidx; pulse_start++) {\n        for (idx = pulse_start; idx < 0; idx += fcb->pitch_lag) ;\n        if (idx >= MAX_FRAMESIZE / 2) {\n            if (use_mask[0])      idx = 0x0F;\n            else if (use_mask[1]) idx = 0x1F;\n            else if (use_mask[2]) idx = 0x2F;\n            else if (use_mask[3]) idx = 0x3F;\n            else if (use_mask[4]) idx = 0x4F;\n            else return -1;\n            idx -= av_log2_16bit(use_mask[idx >> 4]);\n        }\n        if (use_mask[idx >> 4] & (0x8000 >> (idx & 15))) {\n            use_mask[idx >> 4] &= ~(0x8000 >> (idx & 15));\n            n++;\n            start_off = idx;\n        }\n    }\n    fcb->x[fcb->n] = start_off;\n    fcb->y[fcb->n] = bitstream_read_bit(bc) ? -1.0 : 1.0;\n    fcb->n++;\n    n = (MAX_FRAMESIZE / 2 - start_off) % fcb->pitch_lag;\n    s->aw_next_pulse_off_cache = n ? fcb->pitch_lag - n : 0;\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 void bitstream_skip(BitstreamContext *bc, unsigned n)\n{\n    if (n <= bc->bits_left)\n        skip_remaining(bc, n);\n    else {\n        n -= bc->bits_left;\n        skip_remaining(bc, bc->bits_left);\n        if (n >= 64) {\n            unsigned skip = n / 8;\n            n -= skip * 8;\n            bc->ptr += skip;\n        }\n        refill_64(bc);\n        if (n)\n            skip_remaining(bc, n);\n    }\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}']