libavcodec/flacdec.c:377: error: Integer Overflow L2
  ([1, +oo] - [1, 32]):unsigned32 by call to `bitstream_read_signed`.

libavcodec/flacdec.c:334:1: Parameter `s->bps`
332. }
333. 
334. static inline int decode_subframe(FLACContext *s, int channel)
     ^
335. {
336.     int32_t *decoded = s->decoded[channel];

libavcodec/flacdec.c:338:5: Assignment
336.     int32_t *decoded = s->decoded[channel];
337.     int type, wasted = 0;
338.     int bps = s->bps;
         ^
339.     int i, tmp, ret;
340. 

libavcodec/flacdec.c:377:15: Call
375. //FIXME use av_log2 for types
376.     if (type == 0) {
377.         tmp = bitstream_read_signed(&s->bc, bps);
                   ^
378.         for (i = 0; i < s->blocksize; i++)
379.             decoded[i] = tmp;

libavcodec/bitstream.h:198:1: Parameter `n`
  196. /* Return n bits from the buffer as a signed integer.
  197.  * n has to be in the 0-32 range. */
  198. static inline int32_t bitstream_read_signed(BitstreamContext *bc, unsigned n)
       ^
  199. {
  200.     return sign_extend(bitstream_read(bc, n), n);

libavcodec/bitstream.h:200:24: Call
  198. static inline int32_t bitstream_read_signed(BitstreamContext *bc, unsigned n)
  199. {
  200.     return sign_extend(bitstream_read(bc, n), n);
                              ^
  201. }
  202. 

libavcodec/bitstream.h:182:1: Parameter `n`
    180. 
    181. /* Return n bits from the buffer. n has to be in the 0-32 range. */
    182. static inline uint32_t bitstream_read(BitstreamContext *bc, unsigned n)
         ^
    183. {
    184.     if (!n)

libavcodec/bitstream.h:193:12: Call
    191.     }
    192. 
    193.     return get_val(bc, n);
                    ^
    194. }
    195. 

libavcodec/bitstream.h:129:1: <LHS trace>
127. }
128. 
129. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
     ^
130. {
131. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:129:1: Parameter `bc->bits_left`
      127. }
      128. 
      129. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
           ^
      130. {
      131. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:129:1: <RHS trace>
127. }
128. 
129. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
     ^
130. {
131. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:129:1: Parameter `n`
      127. }
      128. 
      129. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
           ^
      130. {
      131. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:138:5: Binary operation: ([1, +oo] - [1, 32]):unsigned32 by call to `bitstream_read_signed` 
      136.     bc->bits <<= n;
      137. #endif
      138.     bc->bits_left -= n;
               ^
      139. 
      140.     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 decode_subframe(FLACContext *s, int channel)\n{\n    int32_t *decoded = s->decoded[channel];\n    int type, wasted = 0;\n    int bps = s->bps;\n    int i, tmp, ret;\n    if (channel == 0) {\n        if (s->ch_mode == FLAC_CHMODE_RIGHT_SIDE)\n            bps++;\n    } else {\n        if (s->ch_mode == FLAC_CHMODE_LEFT_SIDE || s->ch_mode == FLAC_CHMODE_MID_SIDE)\n            bps++;\n    }\n    if (bitstream_read_bit(&s->bc)) {\n        av_log(s->avctx, AV_LOG_ERROR, "invalid subframe padding\\n");\n        return AVERROR_INVALIDDATA;\n    }\n    type = bitstream_read(&s->bc, 6);\n    if (bitstream_read_bit(&s->bc)) {\n        int left = bitstream_bits_left(&s->bc);\n        wasted = 1;\n        if ( left < 0 ||\n            (left < bps && !bitstream_peek(&s->bc, left)) ||\n                           !bitstream_peek(&s->bc, bps)) {\n            av_log(s->avctx, AV_LOG_ERROR,\n                   "Invalid number of wasted bits > available bits (%d) - left=%d\\n",\n                   bps, left);\n            return AVERROR_INVALIDDATA;\n        }\n        while (!bitstream_read_bit(&s->bc))\n            wasted++;\n        bps -= wasted;\n    }\n    if (bps > 32) {\n        avpriv_report_missing_feature(s->avctx, "Decorrelated bit depth > 32");\n        return AVERROR_PATCHWELCOME;\n    }\n    if (type == 0) {\n        tmp = bitstream_read_signed(&s->bc, bps);\n        for (i = 0; i < s->blocksize; i++)\n            decoded[i] = tmp;\n    } else if (type == 1) {\n        for (i = 0; i < s->blocksize; i++)\n            decoded[i] = bitstream_read_signed(&s->bc, bps);\n    } else if ((type >= 8) && (type <= 12)) {\n        if ((ret = decode_subframe_fixed(s, decoded, type & ~0x8, bps)) < 0)\n            return ret;\n    } else if (type >= 32) {\n        if ((ret = decode_subframe_lpc(s, decoded, (type & ~0x20)+1, bps)) < 0)\n            return ret;\n    } else {\n        av_log(s->avctx, AV_LOG_ERROR, "invalid coding type\\n");\n        return AVERROR_INVALIDDATA;\n    }\n    if (wasted) {\n        int i;\n        for (i = 0; i < s->blocksize; i++)\n            decoded[i] <<= wasted;\n    }\n    return 0;\n}', 'static inline int32_t bitstream_read_signed(BitstreamContext *bc, unsigned n)\n{\n    return sign_extend(bitstream_read(bc, n), n);\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 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}']