changeset 1658:2400a22af998 libavformat

check for sane values in ogg_get_length(), fix lol-ffplay.ogm fuzz test
author mru
date Mon, 15 Jan 2007 22:45:50 +0000
parents a472266b5d39
children 82323178664b
files ogg2.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ogg2.c	Mon Jan 15 22:05:22 2007 +0000
+++ b/ogg2.c	Mon Jan 15 22:45:50 2007 +0000
@@ -484,7 +484,8 @@
     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;
     }