[FFmpeg-cvslog] r24352 - trunk/libavformat/asfdec.c

mstorsjo subversion
Tue Jul 20 13:52:29 CEST 2010


Author: mstorsjo
Date: Tue Jul 20 13:52:29 2010
New Revision: 24352

Log:
asfdec: Don't read the video stream header if there isn't enough data

Modified:
   trunk/libavformat/asfdec.c

Modified: trunk/libavformat/asfdec.c
==============================================================================
--- trunk/libavformat/asfdec.c	Tue Jul 20 13:50:57 2010	(r24351)
+++ trunk/libavformat/asfdec.c	Tue Jul 20 13:52:29 2010	(r24352)
@@ -361,7 +361,8 @@ static int asf_read_header(AVFormatConte
                     st->codec->frame_size = 1;
                     break;
                 }
-            } else if (type == AVMEDIA_TYPE_VIDEO) {
+            } else if (type == AVMEDIA_TYPE_VIDEO &&
+                       gsize - (url_ftell(pb) - pos1 + 24) >= 53) {
                 get_le32(pb);
                 get_le32(pb);
                 get_byte(pb);



More information about the ffmpeg-cvslog mailing list