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

libavformat/oggparseflac.c:46:11: Call
44.     bitstream_init(&bc, os->buf + os->pstart, os->psize * 8);
45.     bitstream_skip(&bc, 1); /* metadata_last */
46.     mdt = bitstream_read(&bc, 7);
              ^
47. 
48.     if (mdt == OGG_FLAC_METADATA_TYPE_STREAMINFO) {

libavcodec/bitstream.h:183:1: Parameter `bc->bits_left`
  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)

libavformat/oggparseflac.c:52:9: Call
50.         uint32_t samplerate;
51. 
52.         bitstream_skip(&bc, 4 * 8); /* "FLAC" */
            ^
53.         if (bitstream_read(&bc, 8) != 1) /* unsupported major version */
54.             return -1;

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

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

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] - 32):unsigned32 by call to `bitstream_skip` 
    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\nflac_header (AVFormatContext * s, int idx)\n{\n    struct ogg *ogg = s->priv_data;\n    struct ogg_stream *os = ogg->streams + idx;\n    AVStream *st = s->streams[idx];\n    BitstreamContext bc;\n    int mdt;\n    if (os->buf[os->pstart] == 0xff)\n        return 0;\n    bitstream_init(&bc, os->buf + os->pstart, os->psize * 8);\n    bitstream_skip(&bc, 1);\n    mdt = bitstream_read(&bc, 7);\n    if (mdt == OGG_FLAC_METADATA_TYPE_STREAMINFO) {\n        uint8_t *streaminfo_start = os->buf + os->pstart + 5 + 4 + 4 + 4;\n        uint32_t samplerate;\n        bitstream_skip(&bc, 4 * 8);\n        if (bitstream_read(&bc, 8) != 1)\n            return -1;\n        bitstream_skip(&bc, 8 + 16);\n        bitstream_skip(&bc, 4 * 8);\n        if (bitstream_read(&bc, 32) != FLAC_STREAMINFO_SIZE)\n            return -1;\n        st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;\n        st->codecpar->codec_id = AV_CODEC_ID_FLAC;\n        st->need_parsing = AVSTREAM_PARSE_HEADERS;\n        st->codecpar->extradata =\n            av_malloc(FLAC_STREAMINFO_SIZE + AV_INPUT_BUFFER_PADDING_SIZE);\n        memcpy(st->codecpar->extradata, streaminfo_start, FLAC_STREAMINFO_SIZE);\n        st->codecpar->extradata_size = FLAC_STREAMINFO_SIZE;\n        samplerate = AV_RB24(st->codecpar->extradata + 10) >> 4;\n        if (!samplerate)\n            return AVERROR_INVALIDDATA;\n        avpriv_set_pts_info(st, 64, 1, samplerate);\n    } else if (mdt == FLAC_METADATA_TYPE_VORBIS_COMMENT) {\n        ff_vorbis_stream_comment(s, st, os->buf + os->pstart + 4, os->psize - 4);\n    }\n    return 1;\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 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        skip_remaining(bc, bc->bits_left);\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}']