diff options
author | Måns Rullgård <mans@mansr.com> | 2007-01-15 22:45:50 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2007-01-15 22:45:50 +0000 |
commit | e22f2aaf99c59d788f292c4d7594493068eb4d69 (patch) | |
tree | d61afb0b6a29d5a851a8b5af4d2efda9be61d9c9 /libavformat/ogg2.c | |
parent | 20be72c8909cf22811926a6c182a58bc210e47dc (diff) | |
download | ffmpeg-e22f2aaf99c59d788f292c4d7594493068eb4d69.tar.gz |
check for sane values in ogg_get_length(), fix lol-ffplay.ogm fuzz test
Originally committed as revision 7536 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/ogg2.c')
-rw-r--r-- | libavformat/ogg2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/ogg2.c b/libavformat/ogg2.c index d630d4a3da..64e7733d56 100644 --- a/libavformat/ogg2.c +++ b/libavformat/ogg2.c @@ -484,7 +484,8 @@ ogg_get_length (AVFormatContext * s) url_fseek (&s->pb, end, SEEK_SET); while (!ogg_read_page (s, &i)){ - if (ogg->streams[i].granule != -1 && ogg->streams[i].granule != 0) + if (ogg->streams[i].granule != -1 && ogg->streams[i].granule != 0 && + ogg->streams[i].codec) idx = i; } |