[FFmpeg-cvslog] r13512 - trunk/libavformat/sierravmd.c

michael subversion
Thu May 29 00:26:36 CEST 2008


Author: michael
Date: Thu May 29 00:26:35 2008
New Revision: 13512

Log:
memleak / CID124 RUN2


Modified:
   trunk/libavformat/sierravmd.c

Modified: trunk/libavformat/sierravmd.c
==============================================================================
--- trunk/libavformat/sierravmd.c	(original)
+++ trunk/libavformat/sierravmd.c	Thu May 29 00:26:35 2008
@@ -146,11 +146,11 @@ static int vmd_read_header(AVFormatConte
     vmd->frame_table = NULL;
     sound_buffers = AV_RL16(&vmd->vmd_header[808]);
     raw_frame_table_size = vmd->frame_count * 6;
-    raw_frame_table = av_malloc(raw_frame_table_size);
     if(vmd->frame_count * vmd->frames_per_block  >= UINT_MAX / sizeof(vmd_frame_t)){
         av_log(s, AV_LOG_ERROR, "vmd->frame_count * vmd->frames_per_block too large\n");
         return -1;
     }
+    raw_frame_table = av_malloc(raw_frame_table_size);
     vmd->frame_table = av_malloc((vmd->frame_count * vmd->frames_per_block + sound_buffers) * sizeof(vmd_frame_t));
     if (!raw_frame_table || !vmd->frame_table) {
         av_free(raw_frame_table);




More information about the ffmpeg-cvslog mailing list