libavcodec/wmaprodec.c:923: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned32 by call to `bitstream_read_bit`.

libavcodec/wmaprodec.c:895:1: Parameter `s->bc.bits_left`
893.  *@return 0 on success, < 0 in case of bitstream errors
894.  */
895. static int decode_scale_factors(WMAProDecodeCtx* s)
     ^
896. {
897.     int i;

libavcodec/wmaprodec.c:923:44: Call
921.         }
922. 
923.         if (!s->channel[c].cur_subframe || bitstream_read_bit(&s->bc)) {
                                                ^
924.             if (!s->channel[c].reuse_sf) {
925.                 int val;

libavcodec/bitstream.h:145:1: Parameter `bc->bits_left`
  143. 
  144. /* Return one bit from the buffer. */
  145. static inline unsigned bitstream_read_bit(BitstreamContext *bc)
       ^
  146. {
  147.     if (!bc->bits_left)

libavcodec/bitstream.h:150:12: Call
  148.         refill_64(bc);
  149. 
  150.     return get_val(bc, 1);
                  ^
  151. }
  152. 

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: ([0, +oo] - 1):unsigned32 by call to `bitstream_read_bit` 
    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 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 || bitstream_read_bit(&s->bc)) {\n            if (!s->channel[c].reuse_sf) {\n                int val;\n                s->channel[c].scale_factor_step = bitstream_read(&s->bc, 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 += bitstream_read_vlc(&s->bc, 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 = bitstream_read_vlc(&s->bc, sf_rl_vlc.table, VLCBITS, SCALERLMAXDEPTH);\n                    if (!idx) {\n                        uint32_t code = bitstream_read(&s->bc, 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 = bitstream_read_bit(&s->bc)-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 bitstream_read_bit(BitstreamContext *bc)\n{\n    if (!bc->bits_left)\n        refill_64(bc);\n    return get_val(bc, 1);\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}']