[Mplayer-cvslog] CVS: 0_90/Gui interface.c,1.80,1.81

Diego Biurrun CVS syncmail at mplayerhq.hu
Thu Jul 1 12:22:29 CEST 2004


CVS change done by Diego Biurrun CVS

Update of /cvsroot/mplayer/0_90/Gui
In directory mail:/var2/tmp/cvs-serv26448/Gui

Modified Files:
	interface.c 
Log Message:
string handling security fixes ported from main


Index: interface.c
===================================================================
RCS file: /cvsroot/mplayer/0_90/Gui/interface.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- interface.c	7 Feb 2003 18:06:16 -0000	1.80
+++ interface.c	1 Jul 2004 10:22:27 -0000	1.81
@@ -51,8 +51,12 @@
  if ( *dest )
   {
    tmp=malloc( strlen( *dest ) + strlen( src ) + 1 );
-   strcpy( tmp,*dest ); strcat( tmp,src ); free( *dest ); 
-  }
+   
+   if ( tmp ) /* TODO: advanced error handling */
+    {
+     strcpy( tmp,*dest ); strcat( tmp,src ); free( *dest ); 
+    }
+   }
   else
    { tmp=malloc( strlen( src ) + 1 ); strcpy( tmp,src ); }
  *dest=tmp;




More information about the MPlayer-cvslog mailing list