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

libavcodec/svq3.c:1076:5: Call
1074. 
1075.     /* unknown fields */
1076.     bitstream_skip(&s->bc_slice, 1);
          ^
1077. 
1078.     if (s->unknown_flag)

libavcodec/bitstream.h:247:9: Assignment
  245.         n -= bc->bits_left;
  246.         bc->bits      = 0;
  247.         bc->bits_left = 0;
               ^
  248. 
  249.         if (n >= 64) {

libavcodec/bitstream.h:255:9: Call
  253.             bc->ptr += skip;
  254.         }
  255.         refill_64(bc);
               ^
  256.         if (n)
  257.             skip_remaining(bc, n);

libavcodec/bitstream.h:45:1: Parameter `bc->bits_left`
    43. } BitstreamContext;
    44. 
    45. static inline void refill_64(BitstreamContext *bc)
        ^
    46. {
    47.     if (bc->ptr >= bc->buffer_end)

libavcodec/svq3.c:1079:9: Call
1077. 
1078.     if (s->unknown_flag)
1079.         bitstream_skip(&s->bc_slice, 1);
              ^
1080. 
1081.     bitstream_skip(&s->bc_slice, 1);

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] - 1):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 svq3_decode_slice_header(AVCodecContext *avctx)\n{\n    SVQ3Context *s = avctx->priv_data;\n    const int mb_xy   = s->mb_xy;\n    int i, header;\n    unsigned slice_id;\n    header = bitstream_read(&s->bc, 8);\n    if (((header & 0x9F) != 1 && (header & 0x9F) != 2) || (header & 0x60) == 0) {\n        av_log(avctx, AV_LOG_ERROR, "unsupported slice header (%02X)\\n", header);\n        return -1;\n    } else {\n        int slice_bits, slice_bytes, slice_length;\n        int length = header >> 5 & 3;\n        slice_length = bitstream_peek(&s->bc, 8 * length);\n        slice_bits   = slice_length * 8;\n        slice_bytes  = slice_length + length - 1;\n        bitstream_skip(&s->bc, 8);\n        av_fast_malloc(&s->slice_buf, &s->slice_size, slice_bytes + AV_INPUT_BUFFER_PADDING_SIZE);\n        if (!s->slice_buf)\n            return AVERROR(ENOMEM);\n        if (slice_bytes * 8 > bitstream_bits_left(&s->bc)) {\n            av_log(avctx, AV_LOG_ERROR, "slice after bitstream end\\n");\n            return AVERROR_INVALIDDATA;\n        }\n        memcpy(s->slice_buf, s->bc.buffer + bitstream_tell(&s->bc) / 8, slice_bytes);\n        if (s->watermark_key) {\n            uint32_t header = AV_RL32(&s->bc_slice.buffer[1]);\n            AV_WL32(&s->bc_slice.buffer[1], header ^ s->watermark_key);\n        }\n        if (length > 0) {\n            memcpy(s->slice_buf, &s->slice_buf[slice_length], length - 1);\n        }\n        bitstream_skip(&s->bc, slice_bytes * 8);\n        bitstream_init(&s->bc_slice, s->slice_buf, slice_bits);\n    }\n    if ((slice_id = get_interleaved_ue_golomb(&s->bc_slice)) >= 3) {\n        av_log(s->avctx, AV_LOG_ERROR, "illegal slice type %u \\n", slice_id);\n        return -1;\n    }\n    s->pict_type = ff_h264_golomb_to_pict_type[slice_id];\n    if ((header & 0x9F) == 2) {\n        i = (s->mb_num < 64) ? 6 : (1 + av_log2(s->mb_num - 1));\n        bitstream_read(&s->bc_slice, i);\n    } else {\n        bitstream_skip(&s->bc_slice, 1);\n    }\n    s->slice_num      = bitstream_read(&s->bc_slice, 8);\n    s->qscale         = bitstream_read(&s->bc_slice, 5);\n    s->adaptive_quant = bitstream_read_bit(&s->bc_slice);\n    bitstream_skip(&s->bc_slice, 1);\n    if (s->unknown_flag)\n        bitstream_skip(&s->bc_slice, 1);\n    bitstream_skip(&s->bc_slice, 1);\n    bitstream_skip(&s->bc_slice, 2);\n    while (bitstream_read_bit(&s->bc_slice))\n        bitstream_skip(&s->bc_slice, 8);\n    if (s->mb_x > 0) {\n        memset(s->intra4x4_pred_mode + s->mb2br_xy[mb_xy - 1] + 3,\n               -1, 4 * sizeof(int8_t));\n        memset(s->intra4x4_pred_mode + s->mb2br_xy[mb_xy - s->mb_x],\n               -1, 8 * sizeof(int8_t) * s->mb_x);\n    }\n    if (s->mb_y > 0) {\n        memset(s->intra4x4_pred_mode + s->mb2br_xy[mb_xy - s->mb_stride],\n               -1, 8 * sizeof(int8_t) * (s->mb_width - s->mb_x));\n        if (s->mb_x > 0)\n            s->intra4x4_pred_mode[s->mb2br_xy[mb_xy - s->mb_stride - 1] + 3] = -1;\n    }\n    return 0;\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 refill_64(BitstreamContext *bc)\n{\n    if (bc->ptr >= bc->buffer_end)\n        return;\n#ifdef BITSTREAM_READER_LE\n    bc->bits       = AV_RL64(bc->ptr);\n#else\n    bc->bits       = AV_RB64(bc->ptr);\n#endif\n    bc->ptr       += 8;\n    bc->bits_left  = 64;\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}']