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

libavcodec/wmaprodec.c:903:41: <LHS trace>
901. 
902.                     if (!idx) {
903.                         uint32_t code = get_bits(&s->gb, 14);
                                             ^
904.                         val  =  code >> 6;
905.                         sign = (code & 1) - 1;

libavcodec/wmaprodec.c:903:41: Call
901. 
902.                     if (!idx) {
903.                         uint32_t code = get_bits(&s->gb, 14);
                                             ^
904.                         val  =  code >> 6;
905.                         sign = (code & 1) - 1;

libavcodec/get_bits.h:388:5: Call
  386.     register int tmp;
  387.     OPEN_READER(re, s)
  388.     UPDATE_CACHE(re, s)
           ^
  389.     tmp= SHOW_UBITS(re, s, n);
  390.     LAST_SKIP_BITS(re, s, n)

libavutil/bswap.h:54:1: Parameter `x`
    52. 
    53. #ifndef bswap_32
    54. static av_always_inline av_const uint32_t bswap_32(uint32_t x)
        ^
    55. {
    56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);

libavutil/bswap.h:56:5: Assignment
    54. static av_always_inline av_const uint32_t bswap_32(uint32_t x)
    55. {
    56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
            ^
    57.     x= (x>>16) | (x<<16);
    58.     return x;

libavutil/bswap.h:57:5: Assignment
    55. {
    56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
    57.     x= (x>>16) | (x<<16);
            ^
    58.     return x;
    59. }

libavutil/bswap.h:58:5: Assignment
    56.     x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
    57.     x= (x>>16) | (x<<16);
    58.     return x;
            ^
    59. }
    60. #endif

libavcodec/get_bits.h:388:5: Assignment
  386.     register int tmp;
  387.     OPEN_READER(re, s)
  388.     UPDATE_CACHE(re, s)
           ^
  389.     tmp= SHOW_UBITS(re, s, n);
  390.     LAST_SKIP_BITS(re, s, n)

libavcodec/get_bits.h:389:5: Assignment
  387.     OPEN_READER(re, s)
  388.     UPDATE_CACHE(re, s)
  389.     tmp= SHOW_UBITS(re, s, n);
           ^
  390.     LAST_SKIP_BITS(re, s, n)
  391.     CLOSE_READER(re, s)

libavcodec/get_bits.h:392:5: Assignment
  390.     LAST_SKIP_BITS(re, s, n)
  391.     CLOSE_READER(re, s)
  392.     return tmp;
           ^
  393. }
  394. 

libavcodec/wmaprodec.c:903:25: Assignment
901. 
902.                     if (!idx) {
903.                         uint32_t code = get_bits(&s->gb, 14);
                             ^
904.                         val  =  code >> 6;
905.                         sign = (code & 1) - 1;

libavcodec/wmaprodec.c:905:25: Binary operation: ([0, 1] - 1):unsigned32
903.                         uint32_t code = get_bits(&s->gb, 14);
904.                         val  =  code >> 6;
905.                         sign = (code & 1) - 1;
                             ^
906.                         skip = (code & 0x3f) >> 1;
907.                     } else if (idx == 1) {

static int decode_scale_factors(WMAProDecodeCtx* s)
{
    int i;
    for (i = 0; i < s->channels_for_cur_subframe; i++) {
        int c = s->channel_indexes_for_cur_subframe[i];
        int* sf;
        int* sf_end;
        s->channel[c].scale_factors = s->channel[c].saved_scale_factors[!s->channel[c].scale_factor_idx];
        sf_end = s->channel[c].scale_factors + s->num_bands;
        if (s->channel[c].reuse_sf) {
            const int8_t* sf_offsets = s->sf_offsets[s->table_idx][s->channel[c].table_idx];
            int b;
            for (b = 0; b < s->num_bands; b++)
                s->channel[c].scale_factors[b] =
                    s->channel[c].saved_scale_factors[s->channel[c].scale_factor_idx][*sf_offsets++];
        }
        if (!s->channel[c].cur_subframe || get_bits1(&s->gb)) {
            if (!s->channel[c].reuse_sf) {
                int val;
                s->channel[c].scale_factor_step = get_bits(&s->gb, 2) + 1;
                val = 45 / s->channel[c].scale_factor_step;
                for (sf = s->channel[c].scale_factors; sf < sf_end; sf++) {
                    val += get_vlc2(&s->gb, sf_vlc.table, SCALEVLCBITS, SCALEMAXDEPTH) - 60;
                    *sf = val;
                }
            } else {
                int i;
                for (i = 0; i < s->num_bands; i++) {
                    int idx;
                    int skip;
                    int val;
                    int sign;
                    idx = get_vlc2(&s->gb, sf_rl_vlc.table, VLCBITS, SCALERLMAXDEPTH);
                    if (!idx) {
                        uint32_t code = get_bits(&s->gb, 14);
                        val  =  code >> 6;
                        sign = (code & 1) - 1;
                        skip = (code & 0x3f) >> 1;
                    } else if (idx == 1) {
                        break;
                    } else {
                        skip = scale_rl_run[idx];
                        val  = scale_rl_level[idx];
                        sign = get_bits1(&s->gb)-1;
                    }
                    i += skip;
                    if (i >= s->num_bands) {
                        av_log(s->avctx, AV_LOG_ERROR,
                               "invalid scale factor coding\n");
                        return AVERROR_INVALIDDATA;
                    }
                    s->channel[c].scale_factors[i] += (val ^ sign) - sign;
                }
            }
            s->channel[c].scale_factor_idx = !s->channel[c].scale_factor_idx;
            s->channel[c].table_idx = s->table_idx;
            s->channel[c].reuse_sf  = 1;
        }
        s->channel[c].max_scale_factor = s->channel[c].scale_factors[0];
        for (sf = s->channel[c].scale_factors + 1; sf < sf_end; sf++) {
            s->channel[c].max_scale_factor =
                FFMAX(s->channel[c].max_scale_factor, *sf);
        }
    }
    return 0;
}
['static int decode_scale_factors(WMAProDecodeCtx* s)\n{\n    int i;\n    for (i = 0; i < s->channels_for_cur_subframe; i++) {\n        int c = s->channel_indexes_for_cur_subframe[i];\n        int* sf;\n        int* sf_end;\n        s->channel[c].scale_factors = s->channel[c].saved_scale_factors[!s->channel[c].scale_factor_idx];\n        sf_end = s->channel[c].scale_factors + s->num_bands;\n        if (s->channel[c].reuse_sf) {\n            const int8_t* sf_offsets = s->sf_offsets[s->table_idx][s->channel[c].table_idx];\n            int b;\n            for (b = 0; b < s->num_bands; b++)\n                s->channel[c].scale_factors[b] =\n                    s->channel[c].saved_scale_factors[s->channel[c].scale_factor_idx][*sf_offsets++];\n        }\n        if (!s->channel[c].cur_subframe || get_bits1(&s->gb)) {\n            if (!s->channel[c].reuse_sf) {\n                int val;\n                s->channel[c].scale_factor_step = get_bits(&s->gb, 2) + 1;\n                val = 45 / s->channel[c].scale_factor_step;\n                for (sf = s->channel[c].scale_factors; sf < sf_end; sf++) {\n                    val += get_vlc2(&s->gb, sf_vlc.table, SCALEVLCBITS, SCALEMAXDEPTH) - 60;\n                    *sf = val;\n                }\n            } else {\n                int i;\n                for (i = 0; i < s->num_bands; i++) {\n                    int idx;\n                    int skip;\n                    int val;\n                    int sign;\n                    idx = get_vlc2(&s->gb, sf_rl_vlc.table, VLCBITS, SCALERLMAXDEPTH);\n                    if (!idx) {\n                        uint32_t code = get_bits(&s->gb, 14);\n                        val  =  code >> 6;\n                        sign = (code & 1) - 1;\n                        skip = (code & 0x3f) >> 1;\n                    } else if (idx == 1) {\n                        break;\n                    } else {\n                        skip = scale_rl_run[idx];\n                        val  = scale_rl_level[idx];\n                        sign = get_bits1(&s->gb)-1;\n                    }\n                    i += skip;\n                    if (i >= s->num_bands) {\n                        av_log(s->avctx, AV_LOG_ERROR,\n                               "invalid scale factor coding\\n");\n                        return AVERROR_INVALIDDATA;\n                    }\n                    s->channel[c].scale_factors[i] += (val ^ sign) - sign;\n                }\n            }\n            s->channel[c].scale_factor_idx = !s->channel[c].scale_factor_idx;\n            s->channel[c].table_idx = s->table_idx;\n            s->channel[c].reuse_sf  = 1;\n        }\n        s->channel[c].max_scale_factor = s->channel[c].scale_factors[0];\n        for (sf = s->channel[c].scale_factors + 1; sf < sf_end; sf++) {\n            s->channel[c].max_scale_factor =\n                FFMAX(s->channel[c].max_scale_factor, *sf);\n        }\n    }\n    return 0;\n}', 'static inline unsigned int get_bits(GetBitContext *s, int n){\n    register int tmp;\n    OPEN_READER(re, s)\n    UPDATE_CACHE(re, s)\n    tmp= SHOW_UBITS(re, s, n);\n    LAST_SKIP_BITS(re, s, n)\n    CLOSE_READER(re, s)\n    return tmp;\n}', 'static av_always_inline av_const uint32_t bswap_32(uint32_t x)\n{\n    x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);\n    x= (x>>16) | (x<<16);\n    return x;\n}']