[MPlayer-cvslog] r20618 - trunk/libass/ass.c

eugeni subversion at mplayerhq.hu
Fri Nov 3 02:41:48 CET 2006


Author: eugeni
Date: Fri Nov  3 02:41:48 2006
New Revision: 20618

Modified:
   trunk/libass/ass.c

Log:
Bugfix: sub_recode could deallocate global sub_cp under some circumstances.


Modified: trunk/libass/ass.c
==============================================================================
--- trunk/libass/ass.c	(original)
+++ trunk/libass/ass.c	Fri Nov  3 02:41:48 2006
@@ -805,7 +805,7 @@
 	assert(codepage);
 
 	{
-		char* cp_tmp = codepage;
+		char* cp_tmp = codepage ? strdup(codepage) : 0;
 #ifdef HAVE_ENCA
 		char enca_lang[3], enca_fallback[100];
 		if (sscanf(codepage, "enca:%2s:%99s", enca_lang, enca_fallback) == 2



More information about the MPlayer-cvslog mailing list