[MPlayer-cvslog] r38014 - trunk/libmpdemux/muxer_avi.c

al subversion at mplayerhq.hu
Sat Jan 6 02:54:41 EET 2018


Author: al
Date: Sat Jan  6 02:54:40 2018
New Revision: 38014

Log:
muxer_avi: Remove needless memset to 0 after calloc

The memset calls were originally done after malloc, which was changed
in SVN r18559, to avoid potential integer multiplication overflows.

Patch by >mmcco mykolab com<

Modified:
   trunk/libmpdemux/muxer_avi.c

Modified: trunk/libmpdemux/muxer_avi.c
==============================================================================
--- trunk/libmpdemux/muxer_avi.c	Thu Jan  4 22:12:30 2018	(r38013)
+++ trunk/libmpdemux/muxer_avi.c	Sat Jan  6 02:54:40 2018	(r38014)
@@ -120,7 +120,6 @@ static muxer_stream_t* avifile_new_strea
     si->idx=calloc(si->idxsize, sizeof(struct avi_odmlidx_entry));
     si->riffofssize=16;
     si->riffofs=calloc((si->riffofssize+1), sizeof(off_t));
-    memset(si->riffofs, 0, sizeof(off_t)*si->riffofssize);
 
     switch(type){
     case MUXER_TYPE_VIDEO:
@@ -619,7 +618,6 @@ static void avifile_odml_write_index(mux
 
     si->superidxsize = si->superidxpos;
     si->superidx = calloc(si->superidxsize, sizeof(*si->superidx));
-    memset(si->superidx, 0, sizeof(*si->superidx) * si->superidxsize);
 
     idxpos = 0;
     for (j=0; j<si->superidxpos; j++) {


More information about the MPlayer-cvslog mailing list