libavcodec/indeo5.c:407: error: Integer Overflow L2
  ([1, +oo] - 5):unsigned32 by call to `bitstream_read`.

libavcodec/indeo5.c:407:24: Call
405.         band->checksum = bitstream_read(&ctx->bc, 16);
406. 
407.     band->glob_quant = bitstream_read(&ctx->bc, 5);
                            ^
408. 
409.     /* skip unknown extension if any */

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

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

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] - 5):unsigned32 by call to `bitstream_read` 
    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_band_hdr(IVI45DecContext *ctx, IVIBandDesc *band,\n                           AVCodecContext *avctx)\n{\n    int         i, ret;\n    uint8_t     band_flags;\n    band_flags = bitstream_read(&ctx->bc, 8);\n    if (band_flags & 1) {\n        band->is_empty = 1;\n        return 0;\n    }\n    band->data_size = (ctx->frame_flags & 0x80) ? bitstream_read(&ctx->bc, 24) : 0;\n    band->inherit_mv     = band_flags & 2;\n    band->inherit_qdelta = band_flags & 8;\n    band->qdelta_present = band_flags & 4;\n    if (!band->qdelta_present) band->inherit_qdelta = 1;\n    band->num_corr = 0;\n    if (band_flags & 0x10) {\n        band->num_corr = bitstream_read(&ctx->bc, 8);\n        if (band->num_corr > 61) {\n            av_log(avctx, AV_LOG_ERROR, "Too many corrections: %d\\n",\n                   band->num_corr);\n            return AVERROR_INVALIDDATA;\n        }\n        for (i = 0; i < band->num_corr * 2; i++)\n            band->corr[i] = bitstream_read(&ctx->bc, 8);\n    }\n    band->rvmap_sel = (band_flags & 0x40) ? bitstream_read(&ctx->bc, 3) : 8;\n    ret = ff_ivi_dec_huff_desc(&ctx->bc, band_flags & 0x80, IVI_BLK_HUFF,\n                               &band->blk_vlc, avctx);\n    if (ret < 0)\n        return ret;\n    band->checksum_present = bitstream_read_bit(&ctx->bc);\n    if (band->checksum_present)\n        band->checksum = bitstream_read(&ctx->bc, 16);\n    band->glob_quant = bitstream_read(&ctx->bc, 5);\n    if (band_flags & 0x20) {\n        bitstream_align(&ctx->bc);\n        skip_hdr_extension(&ctx->bc);\n    }\n    bitstream_align(&ctx->bc);\n    return 0;\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}']