[MPlayer-cvslog] r35353 - trunk/sub/subreader.c

reimar subversion at mplayerhq.hu
Mon Nov 5 22:23:46 CET 2012


Author: reimar
Date: Mon Nov  5 22:23:46 2012
New Revision: 35353

Log:
Fix malloc failure check to check the correct variable.

Modified:
   trunk/sub/subreader.c

Modified: trunk/sub/subreader.c
==============================================================================
--- trunk/sub/subreader.c	Mon Nov  5 22:22:14 2012	(r35352)
+++ trunk/sub/subreader.c	Mon Nov  5 22:23:46 2012	(r35353)
@@ -274,7 +274,7 @@ static const char *sub_readtext(const ch
     }
 
     *dest= malloc (len+1);
-    if (!dest) {return ERR;}
+    if (!*dest) {return ERR;}
 
     strncpy(*dest, source, len);
     (*dest)[len]=0;


More information about the MPlayer-cvslog mailing list