libavcodec/truemotion2rt.c:127: error: Integer Overflow L2
  ([0, +oo] - 32):unsigned32 by call to `bitstream_skip`.

libavcodec/truemotion2rt.c:119:11: Call
117.         return ret;
118. 
119.     ret = bitstream_init8(bc, avpkt->data + ret, avpkt->size - ret);
               ^
120.     if (ret < 0)
121.         return ret;

libavcodec/bitstream.h:103:1: Parameter `bc->bits_left`
  101. 
  102. /* Initialize BitstreamContext with buffer size in bytes instead of bits. */
  103. static inline int bitstream_init8(BitstreamContext *bc, const uint8_t *buffer,
       ^
  104.                                   unsigned byte_size)
  105. {

libavcodec/truemotion2rt.c:127:5: Call
125.         return ret;
126. 
127.     bitstream_skip(bc, 32);
         ^
128.     delta_mode = s->delta_size - 2;
129.     dst = p->data[0];

libavcodec/bitstream.h:240:1: Parameter `n`
  238. 
  239. /* Skip n bits in the buffer. */
  240. static inline void bitstream_skip(BitstreamContext *bc, unsigned n)
       ^
  241. {
  242.     if (n < bc->bits_left)

libavcodec/bitstream.h:243:9: Call
  241. {
  242.     if (n < bc->bits_left)
  243.         skip_remaining(bc, n);
               ^
  244.     else {
  245.         n -= bc->bits_left;

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

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

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

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

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

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 truemotion2rt_decode_frame(AVCodecContext *avctx, void *data,\n                                      int *got_frame, AVPacket *avpkt)\n{\n    TrueMotion2RTContext *s = avctx->priv_data;\n    AVFrame * const p = data;\n    BitstreamContext *bc = &s->bc;\n    uint8_t *dst;\n    int x, y, delta_mode;\n    int ret;\n    ret = truemotion2rt_decode_header(avctx, avpkt);\n    if (ret < 0)\n        return ret;\n    ret = bitstream_init8(bc, avpkt->data + ret, avpkt->size - ret);\n    if (ret < 0)\n        return ret;\n    ret = ff_get_buffer(avctx, p, 0);\n    if (ret < 0)\n        return ret;\n    bitstream_skip(bc, 32);\n    delta_mode = s->delta_size - 2;\n    dst = p->data[0];\n    for (y = 0; y < avctx->height; y++) {\n        int diff = 0;\n        for (x = 0; x < avctx->width; x += s->hscale) {\n            diff  += delta_tabs[delta_mode][bitstream_read(bc, s->delta_size)];\n            dst[x] = av_clip_uint8((y ? dst[x - p->linesize[0]] : 0) + diff);\n        }\n        dst += p->linesize[0];\n    }\n    if (s->hscale > 1) {\n        dst = p->data[0];\n        for (y = 0; y < avctx->height; y++) {\n            for (x = 1; x < avctx->width; x += s->hscale)\n                dst[x] = dst[x - 1];\n            dst += p->linesize[0];\n        }\n    }\n    dst = p->data[0];\n    for (y = 0; y < avctx->height; y++) {\n        for (x = 0; x < avctx->width; x++)\n            dst[x] = av_clip_uint8(dst[x] + (dst[x] - 128) / 3);\n        dst += p->linesize[0];\n    }\n    dst = p->data[1];\n    for (y = 0; y < avctx->height >> 2; y++) {\n        int diff = 0;\n        for (x = 0; x < avctx->width >> 2; x += s->hscale) {\n            diff  += delta_tabs[delta_mode][bitstream_read(bc, s->delta_size)];\n            dst[x] = av_clip_uint8((y ? dst[x - p->linesize[1]] : 128) + diff);\n        }\n        dst += p->linesize[1];\n    }\n    if (s->hscale > 1) {\n        dst = p->data[1];\n        for (y = 0; y < avctx->height >> 2; y++) {\n            for (x = 1; x < avctx->width >> 2; x += s->hscale)\n                dst[x] = dst[x - 1];\n            dst += p->linesize[1];\n        }\n    }\n    dst = p->data[1];\n    for (y = 0; y < avctx->height >> 2; y++) {\n        for (x = 0; x < avctx->width >> 2; x++)\n            dst[x] += (dst[x] - 128) / 8;\n        dst += p->linesize[1];\n    }\n    dst = p->data[2];\n    for (y = 0; y < avctx->height >> 2; y++) {\n        int diff = 0;\n        for (x = 0; x < avctx->width >> 2; x += s->hscale) {\n            diff  += delta_tabs[delta_mode][bitstream_read(bc, s->delta_size)];\n            dst[x] = av_clip_uint8((y ? dst[x - p->linesize[2]] : 128) + diff);\n        }\n        dst += p->linesize[2];\n    }\n    if (s->hscale > 1) {\n        dst = p->data[2];\n        for (y = 0; y < avctx->height >> 2; y++) {\n            for (x = 1; x < avctx->width >> 2; x += s->hscale)\n                dst[x] = dst[x - 1];\n            dst += p->linesize[2];\n        }\n    }\n    dst = p->data[2];\n    for (y = 0; y < avctx->height >> 2; y++) {\n        for (x = 0; x < avctx->width >> 2; x++)\n            dst[x] += (dst[x] - 128) / 8;\n        dst += p->linesize[2];\n    }\n    p->pict_type = AV_PICTURE_TYPE_I;\n    p->key_frame = 1;\n    *got_frame = 1;\n    return avpkt->size;\n}', 'static inline int bitstream_init8(BitstreamContext *bc, const uint8_t *buffer,\n                                  unsigned byte_size)\n{\n    if (byte_size > INT_MAX / 8)\n        return AVERROR_INVALIDDATA;\n    return bitstream_init(bc, buffer, byte_size * 8);\n}', 'static inline void bitstream_skip(BitstreamContext *bc, unsigned n)\n{\n    if (n < bc->bits_left)\n        skip_remaining(bc, n);\n    else {\n        n -= bc->bits_left;\n        bc->bits      = 0;\n        bc->bits_left = 0;\n        if (n >= 64) {\n            unsigned skip = n / 8;\n            n -= skip * 8;\n            bc->ptr += skip;\n        }\n        refill_64(bc);\n        if (n)\n            skip_remaining(bc, n);\n    }\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}']