[SCM] libav/experimental: asfdec: Don't read the video stream header if there isn't enough data

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:11:53 UTC 2013


The following commit has been merged in the experimental branch:
commit fed795927182335ddf6c8e39268cfcea989ef7ae
Author: Martin Storsjö <martin at martin.st>
Date:   Tue Jul 20 11:52:29 2010 +0000

    asfdec: Don't read the video stream header if there isn't enough data
    
    Originally committed as revision 24352 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 0da4b94..840c186 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -361,7 +361,8 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
                     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);

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list