libavformat/oggparseflac.c:71: error: Integer Overflow L2
  ([0, +oo] - 4):unsigned32.

libavformat/oggparseflac.c:43:5: <LHS trace>
41. 
42.     init_get_bits(&gb, os->buf + os->pstart, os->psize*8);
43.     skip_bits1(&gb); /* metadata_last */
        ^
44.     mdt = get_bits(&gb, 7);
45. 

libavformat/oggparseflac.c:43:5: Call
41. 
42.     init_get_bits(&gb, os->buf + os->pstart, os->psize*8);
43.     skip_bits1(&gb); /* metadata_last */
        ^
44.     mdt = get_bits(&gb, 7);
45. 

libavcodec/bitstream.h:689:1: Parameter `*s->buffer`
  687. }
  688. 
  689. static inline void skip_bits1(GetBitContext *s){
       ^
  690.     skip_bits(s, 1);
  691. }

libavcodec/bitstream.h:690:5: Call
  688. 
  689. static inline void skip_bits1(GetBitContext *s){
  690.     skip_bits(s, 1);
           ^
  691. }
  692. 

libavcodec/bitstream.h:657:1: Parameter `*s->buffer`
    655. }
    656. 
    657. static inline void skip_bits(GetBitContext *s, int n){
         ^
    658.  //Note gcc seems to optimize this to s->index+=n for the ALT_READER :))
    659.     OPEN_READER(re, s)

libavformat/oggparseflac.c:44:11: Call
42.     init_get_bits(&gb, os->buf + os->pstart, os->psize*8);
43.     skip_bits1(&gb); /* metadata_last */
44.     mdt = get_bits(&gb, 7);
              ^
45. 
46.     if (mdt == OGG_FLAC_METADATA_TYPE_STREAMINFO) {

libavcodec/bitstream.h:634:1: Parameter `*s->buffer`
  632.  * Note, the alt bitstream reader can read up to 25 bits, but the libmpeg2 reader can't
  633.  */
  634. static inline unsigned int get_bits(GetBitContext *s, int n){
       ^
  635.     register int tmp;
  636.     OPEN_READER(re, s)

libavformat/oggparseflac.c:71:9: Binary operation: ([0, +oo] - 4):unsigned32
69.         st->time_base.den = st->codec->sample_rate;
70.     } else if (mdt == FLAC_METADATA_TYPE_VORBIS_COMMENT) {
71.         vorbis_comment (s, os->buf + os->pstart + 4, os->psize - 4);
            ^
72.     }
73. 

static int
flac_header (AVFormatContext * s, int idx)
{
    struct ogg *ogg = s->priv_data;
    struct ogg_stream *os = ogg->streams + idx;
    AVStream *st = s->streams[idx];
    GetBitContext gb;
    FLACStreaminfo si;
    int mdt;
    if (os->buf[os->pstart] == 0xff)
        return 0;
    init_get_bits(&gb, os->buf + os->pstart, os->psize*8);
    skip_bits1(&gb);
    mdt = get_bits(&gb, 7);
    if (mdt == OGG_FLAC_METADATA_TYPE_STREAMINFO) {
        uint8_t *streaminfo_start = os->buf + os->pstart + 5 + 4 + 4 + 4;
        skip_bits_long(&gb, 4*8);
        if(get_bits(&gb, 8) != 1)
            return -1;
        skip_bits_long(&gb, 8 + 16);
        skip_bits_long(&gb, 4*8);
        if (get_bits_long(&gb, 32) != FLAC_STREAMINFO_SIZE)
            return -1;
        ff_flac_parse_streaminfo(st->codec, &si, streaminfo_start);
        st->codec->codec_type = CODEC_TYPE_AUDIO;
        st->codec->codec_id = CODEC_ID_FLAC;
        st->codec->extradata =
            av_malloc(FLAC_STREAMINFO_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
        memcpy(st->codec->extradata, streaminfo_start, FLAC_STREAMINFO_SIZE);
        st->codec->extradata_size = FLAC_STREAMINFO_SIZE;
        st->time_base.num = 1;
        st->time_base.den = st->codec->sample_rate;
    } else if (mdt == FLAC_METADATA_TYPE_VORBIS_COMMENT) {
        vorbis_comment (s, os->buf + os->pstart + 4, os->psize - 4);
    }
    return 1;
}
['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    GetBitContext gb;\n    FLACStreaminfo si;\n    int mdt;\n    if (os->buf[os->pstart] == 0xff)\n        return 0;\n    init_get_bits(&gb, os->buf + os->pstart, os->psize*8);\n    skip_bits1(&gb);\n    mdt = get_bits(&gb, 7);\n    if (mdt == OGG_FLAC_METADATA_TYPE_STREAMINFO) {\n        uint8_t *streaminfo_start = os->buf + os->pstart + 5 + 4 + 4 + 4;\n        skip_bits_long(&gb, 4*8);\n        if(get_bits(&gb, 8) != 1)\n            return -1;\n        skip_bits_long(&gb, 8 + 16);\n        skip_bits_long(&gb, 4*8);\n        if (get_bits_long(&gb, 32) != FLAC_STREAMINFO_SIZE)\n            return -1;\n        ff_flac_parse_streaminfo(st->codec, &si, streaminfo_start);\n        st->codec->codec_type = CODEC_TYPE_AUDIO;\n        st->codec->codec_id = CODEC_ID_FLAC;\n        st->codec->extradata =\n            av_malloc(FLAC_STREAMINFO_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);\n        memcpy(st->codec->extradata, streaminfo_start, FLAC_STREAMINFO_SIZE);\n        st->codec->extradata_size = FLAC_STREAMINFO_SIZE;\n        st->time_base.num = 1;\n        st->time_base.den = st->codec->sample_rate;\n    } else if (mdt == FLAC_METADATA_TYPE_VORBIS_COMMENT) {\n        vorbis_comment (s, os->buf + os->pstart + 4, os->psize - 4);\n    }\n    return 1;\n}', 'static inline void skip_bits1(GetBitContext *s){\n    skip_bits(s, 1);\n}', 'static inline void skip_bits(GetBitContext *s, int n){\n    OPEN_READER(re, s)\n    UPDATE_CACHE(re, s)\n    LAST_SKIP_BITS(re, s, n)\n    CLOSE_READER(re, s)\n}', 'static inline unsigned int get_bits(GetBitContext *s, int n){\n    register int tmp;\n    OPEN_READER(re, s)\n    UPDATE_CACHE(re, s)\n    tmp= SHOW_UBITS(re, s, n);\n    LAST_SKIP_BITS(re, s, n)\n    CLOSE_READER(re, s)\n    return tmp;\n}']