[MPlayer-cvslog] CVS: main/input input.c,1.118,1.119

Reimar Döffinger CVS syncmail at mplayerhq.hu
Sat Jul 23 18:54:47 CEST 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/input
In directory mail:/var2/tmp/cvs-serv20349

Modified Files:
	input.c 
Log Message:
use calloc so that mp_cmd_free won't use uninitialized data in case of an error


Index: input.c
===================================================================
RCS file: /cvsroot/mplayer/main/input/input.c,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -r1.118 -r1.119
--- input.c	27 Jun 2005 08:16:23 -0000	1.118
+++ input.c	23 Jul 2005 16:54:45 -0000	1.119
@@ -577,7 +577,7 @@
 
   cmd_def = &mp_cmds[i];
 
-  cmd = (mp_cmd_t*)malloc(sizeof(mp_cmd_t));
+  cmd = (mp_cmd_t*)calloc(1, sizeof(mp_cmd_t));
   cmd->id = cmd_def->id;
   cmd->name = strdup(cmd_def->name);
   cmd->pausing = pausing;




More information about the MPlayer-cvslog mailing list