Browse Source

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
tags/v0.5
Måns Rullgård 19 years ago
parent
commit
e22f2aaf99
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/ogg2.c

+ 2
- 1
libavformat/ogg2.c View File

@@ -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