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
pull/126/head
Måns Rullgård 18 years ago
parent 20be72c890
commit e22f2aaf99
  1. 3
      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;
}

Loading…
Cancel
Save