[DVDnav-discuss] r937 - trunk/libdvdnav/src/dvdread/dvd_reader.c

nicodvb subversion at mplayerhq.hu
Sat May 5 12:52:11 CEST 2007


Author: nicodvb
Date: Sat May  5 12:52:11 2007
New Revision: 937

Log:
in DVDOpen() exit if strdup() fails; part of a patch by Videolan team

Modified:
   trunk/libdvdnav/src/dvdread/dvd_reader.c

Modified: trunk/libdvdnav/src/dvdread/dvd_reader.c
==============================================================================
--- trunk/libdvdnav/src/dvdread/dvd_reader.c	(original)
+++ trunk/libdvdnav/src/dvdread/dvd_reader.c	Sat May  5 12:52:11 2007
@@ -332,6 +332,8 @@ dvd_reader_t *DVDOpen( const char *ppath
       return 0;
 
 	path = strdup(ppath);
+    if( path == NULL )
+      return 0;
 	
     /* Try to open libdvdcss or fall back to standard functions */
     have_css = dvdinput_setup();



More information about the DVDnav-discuss mailing list