libavcodec/wmaprodec.c:832: error: Integer Overflow L2
  ([0, 1] - 1):unsigned32.

libavcodec/wmaprodec.c:832:28: <LHS trace>
830.         for (i = 0; i < 4; i++) {
831.             if (vals[i]) {
832.                 int sign = get_bits1(&s->gb) - 1;
                                ^
833.                 *(uint32_t*)&ci->coeffs[cur_coeff] = vals[i] ^ sign<<31;
834.                 num_zeros = 0;

libavcodec/wmaprodec.c:832:28: Call
830.         for (i = 0; i < 4; i++) {
831.             if (vals[i]) {
832.                 int sign = get_bits1(&s->gb) - 1;
                                ^
833.                 *(uint32_t*)&ci->coeffs[cur_coeff] = vals[i] ^ sign<<31;
834.                 num_zeros = 0;

libavcodec/get_bits.h:393:1: Parameter `s->index`
  391. }
  392. 
  393. static inline unsigned int get_bits1(GetBitContext *s){
       ^
  394. #ifdef ALT_BITSTREAM_READER
  395.     unsigned int index= s->index;

libavcodec/get_bits.h:395:5: Assignment
  393. static inline unsigned int get_bits1(GetBitContext *s){
  394. #ifdef ALT_BITSTREAM_READER
  395.     unsigned int index= s->index;
           ^
  396.     uint8_t result= s->buffer[ index>>3 ];
  397. #ifdef ALT_BITSTREAM_READER_LE

libavcodec/get_bits.h:398:5: Assignment
  396.     uint8_t result= s->buffer[ index>>3 ];
  397. #ifdef ALT_BITSTREAM_READER_LE
  398.     result>>= (index&0x07);
           ^
  399.     result&= 1;
  400. #else

libavcodec/get_bits.h:399:5: Assignment
  397. #ifdef ALT_BITSTREAM_READER_LE
  398.     result>>= (index&0x07);
  399.     result&= 1;
           ^
  400. #else
  401.     result<<= (index&0x07);

libavcodec/get_bits.h:407:5: Assignment
  405.     s->index= index;
  406. 
  407.     return result;
           ^
  408. #else
  409.     return get_bits(s, 1);

libavcodec/wmaprodec.c:832:17: Binary operation: ([0, 1] - 1):unsigned32
830.         for (i = 0; i < 4; i++) {
831.             if (vals[i]) {
832.                 int sign = get_bits1(&s->gb) - 1;
                     ^
833.                 *(uint32_t*)&ci->coeffs[cur_coeff] = vals[i] ^ sign<<31;
834.                 num_zeros = 0;

static int decode_coeffs(WMAProDecodeCtx *s, int c)
{
    static const int fval_tab[16] = {
        0x00000000, 0x3f800000, 0x40000000, 0x40400000,
        0x40800000, 0x40a00000, 0x40c00000, 0x40e00000,
        0x41000000, 0x41100000, 0x41200000, 0x41300000,
        0x41400000, 0x41500000, 0x41600000, 0x41700000,
    };
    int vlctable;
    VLC* vlc;
    WMAProChannelCtx* ci = &s->channel[c];
    int rl_mode = 0;
    int cur_coeff = 0;
    int num_zeros = 0;
    const uint16_t* run;
    const float* level;
    dprintf(s->avctx, "decode coefficients for channel %i\n", c);
    vlctable = get_bits1(&s->gb);
    vlc = &coef_vlc[vlctable];
    if (vlctable) {
        run = coef1_run;
        level = coef1_level;
    } else {
        run = coef0_run;
        level = coef0_level;
    }
    while (!rl_mode && cur_coeff + 3 < s->subframe_len) {
        int vals[4];
        int i;
        unsigned int idx;
        idx = get_vlc2(&s->gb, vec4_vlc.table, VLCBITS, VEC4MAXDEPTH);
        if (idx == HUFF_VEC4_SIZE - 1) {
            for (i = 0; i < 4; i += 2) {
                idx = get_vlc2(&s->gb, vec2_vlc.table, VLCBITS, VEC2MAXDEPTH);
                if (idx == HUFF_VEC2_SIZE - 1) {
                    int v0, v1;
                    v0 = get_vlc2(&s->gb, vec1_vlc.table, VLCBITS, VEC1MAXDEPTH);
                    if (v0 == HUFF_VEC1_SIZE - 1)
                        v0 += ff_wma_get_large_val(&s->gb);
                    v1 = get_vlc2(&s->gb, vec1_vlc.table, VLCBITS, VEC1MAXDEPTH);
                    if (v1 == HUFF_VEC1_SIZE - 1)
                        v1 += ff_wma_get_large_val(&s->gb);
                    ((float*)vals)[i  ] = v0;
                    ((float*)vals)[i+1] = v1;
                } else {
                    vals[i]   = fval_tab[symbol_to_vec2[idx] >> 4 ];
                    vals[i+1] = fval_tab[symbol_to_vec2[idx] & 0xF];
                }
            }
        } else {
            vals[0] = fval_tab[ symbol_to_vec4[idx] >> 12      ];
            vals[1] = fval_tab[(symbol_to_vec4[idx] >> 8) & 0xF];
            vals[2] = fval_tab[(symbol_to_vec4[idx] >> 4) & 0xF];
            vals[3] = fval_tab[ symbol_to_vec4[idx]       & 0xF];
        }
        for (i = 0; i < 4; i++) {
            if (vals[i]) {
                int sign = get_bits1(&s->gb) - 1;
                *(uint32_t*)&ci->coeffs[cur_coeff] = vals[i] ^ sign<<31;
                num_zeros = 0;
            } else {
                ci->coeffs[cur_coeff] = 0;
                rl_mode |= (++num_zeros > s->subframe_len >> 8);
            }
            ++cur_coeff;
        }
    }
    if (rl_mode) {
        memset(&ci->coeffs[cur_coeff], 0,
               sizeof(*ci->coeffs) * (s->subframe_len - cur_coeff));
        if (ff_wma_run_level_decode(s->avctx, &s->gb, vlc,
                                    level, run, 1, ci->coeffs,
                                    cur_coeff, s->subframe_len,
                                    s->subframe_len, s->esc_len, 0))
            return AVERROR_INVALIDDATA;
    }
    return 0;
}
['static int decode_coeffs(WMAProDecodeCtx *s, int c)\n{\n    static const int fval_tab[16] = {\n        0x00000000, 0x3f800000, 0x40000000, 0x40400000,\n        0x40800000, 0x40a00000, 0x40c00000, 0x40e00000,\n        0x41000000, 0x41100000, 0x41200000, 0x41300000,\n        0x41400000, 0x41500000, 0x41600000, 0x41700000,\n    };\n    int vlctable;\n    VLC* vlc;\n    WMAProChannelCtx* ci = &s->channel[c];\n    int rl_mode = 0;\n    int cur_coeff = 0;\n    int num_zeros = 0;\n    const uint16_t* run;\n    const float* level;\n    dprintf(s->avctx, "decode coefficients for channel %i\\n", c);\n    vlctable = get_bits1(&s->gb);\n    vlc = &coef_vlc[vlctable];\n    if (vlctable) {\n        run = coef1_run;\n        level = coef1_level;\n    } else {\n        run = coef0_run;\n        level = coef0_level;\n    }\n    while (!rl_mode && cur_coeff + 3 < s->subframe_len) {\n        int vals[4];\n        int i;\n        unsigned int idx;\n        idx = get_vlc2(&s->gb, vec4_vlc.table, VLCBITS, VEC4MAXDEPTH);\n        if (idx == HUFF_VEC4_SIZE - 1) {\n            for (i = 0; i < 4; i += 2) {\n                idx = get_vlc2(&s->gb, vec2_vlc.table, VLCBITS, VEC2MAXDEPTH);\n                if (idx == HUFF_VEC2_SIZE - 1) {\n                    int v0, v1;\n                    v0 = get_vlc2(&s->gb, vec1_vlc.table, VLCBITS, VEC1MAXDEPTH);\n                    if (v0 == HUFF_VEC1_SIZE - 1)\n                        v0 += ff_wma_get_large_val(&s->gb);\n                    v1 = get_vlc2(&s->gb, vec1_vlc.table, VLCBITS, VEC1MAXDEPTH);\n                    if (v1 == HUFF_VEC1_SIZE - 1)\n                        v1 += ff_wma_get_large_val(&s->gb);\n                    ((float*)vals)[i  ] = v0;\n                    ((float*)vals)[i+1] = v1;\n                } else {\n                    vals[i]   = fval_tab[symbol_to_vec2[idx] >> 4 ];\n                    vals[i+1] = fval_tab[symbol_to_vec2[idx] & 0xF];\n                }\n            }\n        } else {\n            vals[0] = fval_tab[ symbol_to_vec4[idx] >> 12      ];\n            vals[1] = fval_tab[(symbol_to_vec4[idx] >> 8) & 0xF];\n            vals[2] = fval_tab[(symbol_to_vec4[idx] >> 4) & 0xF];\n            vals[3] = fval_tab[ symbol_to_vec4[idx]       & 0xF];\n        }\n        for (i = 0; i < 4; i++) {\n            if (vals[i]) {\n                int sign = get_bits1(&s->gb) - 1;\n                *(uint32_t*)&ci->coeffs[cur_coeff] = vals[i] ^ sign<<31;\n                num_zeros = 0;\n            } else {\n                ci->coeffs[cur_coeff] = 0;\n                rl_mode |= (++num_zeros > s->subframe_len >> 8);\n            }\n            ++cur_coeff;\n        }\n    }\n    if (rl_mode) {\n        memset(&ci->coeffs[cur_coeff], 0,\n               sizeof(*ci->coeffs) * (s->subframe_len - cur_coeff));\n        if (ff_wma_run_level_decode(s->avctx, &s->gb, vlc,\n                                    level, run, 1, ci->coeffs,\n                                    cur_coeff, s->subframe_len,\n                                    s->subframe_len, s->esc_len, 0))\n            return AVERROR_INVALIDDATA;\n    }\n    return 0;\n}', 'static inline unsigned int get_bits1(GetBitContext *s){\n#ifdef ALT_BITSTREAM_READER\n    unsigned int index= s->index;\n    uint8_t result= s->buffer[ index>>3 ];\n#ifdef ALT_BITSTREAM_READER_LE\n    result>>= (index&0x07);\n    result&= 1;\n#else\n    result<<= (index&0x07);\n    result>>= 8 - 1;\n#endif\n    index++;\n    s->index= index;\n    return result;\n#else\n    return get_bits(s, 1);\n#endif\n}']