[FFmpeg-cvslog] mp4: Don't read an empty Decoder Config Descriptor

Alex Converse git at videolan.org
Mon Mar 19 05:30:22 CET 2012


ffmpeg | branch: release/0.8 | Alex Converse <alex.converse at gmail.com> | Wed Sep 21 15:26:35 2011 -0700| [684f671f2874855d6e9872213097e732bc5cfb18] | committer: Reinhard Tartler

mp4: Don't read an empty Decoder Config Descriptor

(cherry picked from commit 1c2e07b8111b24f62b8d1bda62907848e34dfbcb)

Signed-off-by: Anton Khirnov <anton at khirnov.net>

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

 libavformat/isom.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/isom.c b/libavformat/isom.c
index eb17e25..fb2ce23 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -395,7 +395,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext
     len = ff_mp4_read_descr(fc, pb, &tag);
     if (tag == MP4DecSpecificDescrTag) {
         av_dlog(fc, "Specific MPEG4 header len=%d\n", len);
-        if((uint64_t)len > (1<<30))
+        if (!len || (uint64_t)len > (1<<30))
             return -1;
         av_free(st->codec->extradata);
         st->codec->extradata = av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE);



More information about the ffmpeg-cvslog mailing list