[FFmpeg-cvslog] Avoid huge memory allocations from asf demuxer.

Carl Eugen Hoyos git at videolan.org
Sat Mar 2 18:39:02 CET 2013


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sat Mar  2 18:37:55 2013 +0100| [6091a8d92d26f55c83e907da59ffdb8dfc7865c3] | committer: Carl Eugen Hoyos

Avoid huge memory allocations from asf demuxer.

Fixes ticket #1888.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6091a8d92d26f55c83e907da59ffdb8dfc7865c3
---

 libavformat/asfdec.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 233b6ca..38f46a6 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -1011,6 +1011,7 @@ static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb)
         asf->packet_obj_size = avio_rl32(pb);
         if (asf->packet_obj_size >= (1 << 24) || asf->packet_obj_size <= 0) {
             av_log(s, AV_LOG_ERROR, "packet_obj_size invalid\n");
+            asf->packet_obj_size = 0;
             return AVERROR_INVALIDDATA;
         }
         asf->packet_frag_timestamp = avio_rl32(pb); // timestamp



More information about the ffmpeg-cvslog mailing list