libavcodec/fraps.c:117: error: Integer Overflow L2
  ([0, +oo] - 11):unsigned32 by call to `bitstream_read_vlc`.

libavcodec/fraps.c:114:5: Call
112.                       (const uint32_t *) src, size >> 2);
113. 
114.     bitstream_init(&bc, s->tmpbuf, size * 8);
         ^
115.     for (j = 0; j < h; j++) {
116.         for (i = 0; i < w*step; i += step) {

libavcodec/bitstream.h:85:9: Assignment
  83.         bc->buffer    =
  84.         bc->ptr       = NULL;
  85.         bc->bits_left = 0;
              ^
  86.         return AVERROR_INVALIDDATA;
  87.     }

libavcodec/fraps.c:117:22: Call
115.     for (j = 0; j < h; j++) {
116.         for (i = 0; i < w*step; i += step) {
117.             dst[i] = bitstream_read_vlc(&bc, vlc.table, VLC_BITS, 3);
                          ^
118.             /* lines are stored as deltas between previous lines
119.              * and we need to add 0x80 to the first lines of chroma planes

libavcodec/bitstream.h:313:1: Parameter `bits`
  311.  * If the VLC code is invalid and max_depth > 1, then the number of bits removed
  312.  * is undefined. */
  313. static inline int bitstream_read_vlc(BitstreamContext *bc, VLC_TYPE (*table)[2],
       ^
  314.                                      int bits, int max_depth)
  315. {

libavcodec/bitstream.h:322:9: Call
  320. 
  321.     if (max_depth > 1 && n < 0) {
  322.         skip_remaining(bc, bits);
               ^
  323.         code = set_idx(bc, code, &n, &nb_bits, table);
  324.         if (max_depth > 2 && n < 0) {

libavcodec/bitstream.h:230:1: <LHS trace>
228. }
229. 
230. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
     ^
231. {
232. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:230:1: Parameter `bc->bits_left`
    228. }
    229. 
    230. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
         ^
    231. {
    232. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:230:1: <RHS trace>
228. }
229. 
230. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
     ^
231. {
232. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:230:1: Parameter `n`
    228. }
    229. 
    230. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
         ^
    231. {
    232. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:237:5: Binary operation: ([0, +oo] - 11):unsigned32 by call to `bitstream_read_vlc` 
    235.     bc->bits <<= n;
    236. #endif
    237.     bc->bits_left -= n;
             ^
    238. }
    239. 

static inline void skip_remaining(BitstreamContext *bc, unsigned n)
{
#ifdef BITSTREAM_READER_LE
    bc->bits >>= n;
#else
    bc->bits <<= n;
#endif
    bc->bits_left -= n;
}
['static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w,\n                               int h, const uint8_t *src, int size, int Uoff,\n                               const int step)\n{\n    int i, j, ret;\n    BitstreamContext bc;\n    VLC vlc;\n    Node nodes[512];\n    for (i = 0; i < 256; i++)\n        nodes[i].count = bytestream_get_le32(&src);\n    size -= 1024;\n    if ((ret = ff_huff_build_tree(s->avctx, &vlc, 256, VLC_BITS,\n                                  nodes, huff_cmp,\n                                  FF_HUFFMAN_FLAG_ZERO_COUNT)) < 0)\n        return ret;\n    s->bdsp.bswap_buf((uint32_t *) s->tmpbuf,\n                      (const uint32_t *) src, size >> 2);\n    bitstream_init(&bc, s->tmpbuf, size * 8);\n    for (j = 0; j < h; j++) {\n        for (i = 0; i < w*step; i += step) {\n            dst[i] = bitstream_read_vlc(&bc, vlc.table, VLC_BITS, 3);\n            if (j)\n                dst[i] += dst[i - stride];\n            else if (Uoff)\n                dst[i] += 0x80;\n            if (bitstream_bits_left(&bc) < 0) {\n                ff_free_vlc(&vlc);\n                return AVERROR_INVALIDDATA;\n            }\n        }\n        dst += stride;\n    }\n    ff_free_vlc(&vlc);\n    return 0;\n}', 'static inline int bitstream_init(BitstreamContext *bc, const uint8_t *buffer,\n                                 unsigned bit_size)\n{\n    unsigned buffer_size;\n    if (bit_size > INT_MAX - 7 || !buffer) {\n        buffer        =\n        bc->buffer    =\n        bc->ptr       = NULL;\n        bc->bits_left = 0;\n        return AVERROR_INVALIDDATA;\n    }\n    buffer_size = (bit_size + 7) >> 3;\n    bc->buffer       = buffer;\n    bc->buffer_end   = buffer + buffer_size;\n    bc->ptr          = bc->buffer;\n    bc->size_in_bits = bit_size;\n    bc->bits_left    = 0;\n    bc->bits         = 0;\n    refill_64(bc);\n    return 0;\n}', 'static inline int bitstream_read_vlc(BitstreamContext *bc, VLC_TYPE (*table)[2],\n                                     int bits, int max_depth)\n{\n    int nb_bits;\n    unsigned idx = bitstream_peek(bc, bits);\n    int code = table[idx][0];\n    int n    = table[idx][1];\n    if (max_depth > 1 && n < 0) {\n        skip_remaining(bc, bits);\n        code = set_idx(bc, code, &n, &nb_bits, table);\n        if (max_depth > 2 && n < 0) {\n            skip_remaining(bc, nb_bits);\n            code = set_idx(bc, code, &n, &nb_bits, table);\n        }\n    }\n    skip_remaining(bc, n);\n    return code;\n}', 'static inline void skip_remaining(BitstreamContext *bc, unsigned n)\n{\n#ifdef BITSTREAM_READER_LE\n    bc->bits >>= n;\n#else\n    bc->bits <<= n;\n#endif\n    bc->bits_left -= n;\n}']