aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/ogg2.c
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2007-01-15 22:45:50 +0000
committerMåns Rullgård <mans@mansr.com>2007-01-15 22:45:50 +0000
commite22f2aaf99c59d788f292c4d7594493068eb4d69 (patch)
treed61afb0b6a29d5a851a8b5af4d2efda9be61d9c9 /libavformat/ogg2.c
parent20be72c8909cf22811926a6c182a58bc210e47dc (diff)
downloadffmpeg-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.c3
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;
}