[FFmpeg-cvslog] r12208 - trunk/libavformat/mov.c

bcoudurier subversion
Mon Feb 25 13:46:00 CET 2008


Author: bcoudurier
Date: Mon Feb 25 13:45:59 2008
New Revision: 12208

Log:
protect malloc overflow

Modified:
   trunk/libavformat/mov.c

Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c	(original)
+++ trunk/libavformat/mov.c	Mon Feb 25 13:45:59 2008
@@ -291,6 +291,8 @@ static int mov_read_esds(MOVContext *c, 
         len = mp4_read_descr(c, pb, &tag);
         if (tag == MP4DecSpecificDescrTag) {
             dprintf(c->fc, "Specific MPEG4 header len=%d\n", len);
+            if((uint64_t)len > (1<<30))
+                return -1;
             st->codec->extradata = av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE);
             if (!st->codec->extradata)
                 return AVERROR(ENOMEM);




More information about the ffmpeg-cvslog mailing list