[Mplayer-cvslog] CVS: main/Gui interface.c,1.93,1.94

Diego Biurrun CVS syncmail at mplayerhq.hu
Fri Jun 25 18:49:55 CEST 2004


CVS change done by Diego Biurrun CVS

Update of /cvsroot/mplayer/main/Gui
In directory mail:/var2/tmp/cvs-serv17907/Gui

Modified Files:
	interface.c 
Log Message:
string handling security fixes
patch by Nicholas Kain, Alexander Strasser <eclipse7 at gmx.net>
reviewed by Pontscho, Alex, Rich


Index: interface.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- interface.c	25 Mar 2004 21:49:47 -0000	1.93
+++ interface.c	25 Jun 2004 16:49:52 -0000	1.94
@@ -54,8 +54,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