libavcodec/wavpack.c:692: error: Integer Overflow L2
  ([-1, +oo] - 1):unsigned32 by call to `wv_get_value_float`.

libavcodec/wavpack.c:648:1: Parameter `s->bc_extra_bits.bits_left`
646. }
647. 
648. static inline int wv_unpack_mono(WavpackFrameContext *s, BitstreamContext *bc,
     ^
649.                                  void *dst, const int type)
650. {

libavcodec/wavpack.c:692:24: Call
690. 
691.         if (type == AV_SAMPLE_FMT_FLTP) {
692.             *dstfl++ = wv_get_value_float(s, &crc_extra_bits, S);
                            ^
693.         } else if (type == AV_SAMPLE_FMT_S32P) {
694.             *dst32++ = wv_get_value_integer(s, &crc_extra_bits, S);

libavcodec/wavpack.c:435:1: Parameter `s->bc_extra_bits.bits_left`
  433. }
  434. 
  435. static float wv_get_value_float(WavpackFrameContext *s, uint32_t *crc, int S)
       ^
  436. {
  437.     union {

libavcodec/wavpack.c:491:17: Call
  489.         exp  = 0;
  490.         if (s->got_extra_bits && (s->float_flag & WV_FLT_ZERO_SENT)) {
  491.             if (bitstream_read_bit(&s->bc_extra_bits)) {
                       ^
  492.                 S = bitstream_read(&s->bc_extra_bits, 23);
  493.                 if (s->float_max_exp >= 25)

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: 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: Assignment
      137.     bc->bits <<= n;
      138. #endif
      139.     bc->bits_left -= n;
               ^
      140. 
      141.     return ret;

libavcodec/wavpack.c:498:28: Call
  496.             } else {
  497.                 if (s->float_flag & WV_FLT_ZERO_SIGN)
  498.                     sign = bitstream_read_bit(&s->bc_extra_bits);
                                  ^
  499.             }
  500.         }

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: ([-1, +oo] - 1):unsigned32 by call to `wv_get_value_float` 
      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 inline int wv_unpack_mono(WavpackFrameContext *s, BitstreamContext *bc,\n                                 void *dst, const int type)\n{\n    int i, j, count = 0;\n    int last, t;\n    int A, S, T;\n    int pos                  = s->pos;\n    uint32_t crc             = s->sc.crc;\n    uint32_t crc_extra_bits  = s->extra_sc.crc;\n    int16_t *dst16           = dst;\n    int32_t *dst32           = dst;\n    float *dstfl             = dst;\n    s->one = s->zero = s->zeroes = 0;\n    do {\n        T = wv_get_value(s, bc, 0, &last);\n        S = 0;\n        if (last)\n            break;\n        for (i = 0; i < s->terms; i++) {\n            t = s->decorr[i].value;\n            if (t > 8) {\n                if (t & 1)\n                    A =  2 * s->decorr[i].samplesA[0] - s->decorr[i].samplesA[1];\n                else\n                    A = (3 * s->decorr[i].samplesA[0] - s->decorr[i].samplesA[1]) >> 1;\n                s->decorr[i].samplesA[1] = s->decorr[i].samplesA[0];\n                j                        = 0;\n            } else {\n                A = s->decorr[i].samplesA[pos];\n                j = (pos + t) & 7;\n            }\n            if (type != AV_SAMPLE_FMT_S16P)\n                S = T + ((s->decorr[i].weightA * (int64_t)A + 512) >> 10);\n            else\n                S = T + ((s->decorr[i].weightA * A + 512) >> 10);\n            if (A && T)\n                s->decorr[i].weightA -= ((((T ^ A) >> 30) & 2) - 1) * s->decorr[i].delta;\n            s->decorr[i].samplesA[j] = T = S;\n        }\n        pos = (pos + 1) & 7;\n        crc = crc * 3 + S;\n        if (type == AV_SAMPLE_FMT_FLTP) {\n            *dstfl++ = wv_get_value_float(s, &crc_extra_bits, S);\n        } else if (type == AV_SAMPLE_FMT_S32P) {\n            *dst32++ = wv_get_value_integer(s, &crc_extra_bits, S);\n        } else {\n            *dst16++ = wv_get_value_integer(s, &crc_extra_bits, S);\n        }\n        count++;\n    } while (!last && count < s->samples);\n    wv_reset_saved_context(s);\n    if (s->avctx->err_recognition & AV_EF_CRCCHECK) {\n        int ret = wv_check_crc(s, crc, crc_extra_bits);\n        if (ret < 0 && s->avctx->err_recognition & AV_EF_EXPLODE)\n            return ret;\n    }\n    return 0;\n}', 'static float wv_get_value_float(WavpackFrameContext *s, uint32_t *crc, int S)\n{\n    union {\n        float    f;\n        uint32_t u;\n    } value;\n    unsigned int sign;\n    int exp = s->float_max_exp;\n    if (s->got_extra_bits) {\n        const int max_bits  = 1 + 23 + 8 + 1;\n        const int left_bits = bitstream_bits_left(&s->bc_extra_bits);\n        if (left_bits + 8 * AV_INPUT_BUFFER_PADDING_SIZE < max_bits)\n            return 0.0;\n    }\n    if (S) {\n        S  <<= s->float_shift;\n        sign = S < 0;\n        if (sign)\n            S = -S;\n        if (S >= 0x1000000) {\n            if (s->got_extra_bits && bitstream_read_bit(&s->bc_extra_bits))\n                S = bitstream_read(&s->bc_extra_bits, 23);\n            else\n                S = 0;\n            exp = 255;\n        } else if (exp) {\n            int shift = 23 - av_log2(S);\n            exp = s->float_max_exp;\n            if (exp <= shift)\n                shift = --exp;\n            exp -= shift;\n            if (shift) {\n                S <<= shift;\n                if ((s->float_flag & WV_FLT_SHIFT_ONES) ||\n                    (s->got_extra_bits &&\n                     (s->float_flag & WV_FLT_SHIFT_SAME) &&\n                     bitstream_read_bit(&s->bc_extra_bits))) {\n                    S |= (1 << shift) - 1;\n                } else if (s->got_extra_bits &&\n                           (s->float_flag & WV_FLT_SHIFT_SENT)) {\n                    S |= bitstream_read(&s->bc_extra_bits, shift);\n                }\n            }\n        } else {\n            exp = s->float_max_exp;\n        }\n        S &= 0x7fffff;\n    } else {\n        sign = 0;\n        exp  = 0;\n        if (s->got_extra_bits && (s->float_flag & WV_FLT_ZERO_SENT)) {\n            if (bitstream_read_bit(&s->bc_extra_bits)) {\n                S = bitstream_read(&s->bc_extra_bits, 23);\n                if (s->float_max_exp >= 25)\n                    exp = bitstream_read(&s->bc_extra_bits, 8);\n                sign = bitstream_read_bit(&s->bc_extra_bits);\n            } else {\n                if (s->float_flag & WV_FLT_ZERO_SIGN)\n                    sign = bitstream_read_bit(&s->bc_extra_bits);\n            }\n        }\n    }\n    *crc = *crc * 27 + S * 9 + exp * 3 + sign;\n    value.u = (sign << 31) | (exp << 23) | S;\n    return value.f;\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}']