[DVDnav-discuss] r1005 - trunk/libdvdnav/src/dvdread/dvd_udf.c

nicodvb subversion at mplayerhq.hu
Sat Apr 19 11:29:18 CEST 2008


Author: nicodvb
Date: Sat Apr 19 11:29:18 2008
New Revision: 1005

Log:
prevent string overflow in static buffer using strncat(MAX_UDF_FILE_NAME_LEN-1) instead of strcat() ; patch by Erik Hovland  - erik hovland org

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

Modified: trunk/libdvdnav/src/dvdread/dvd_udf.c
==============================================================================
--- trunk/libdvdnav/src/dvdread/dvd_udf.c	(original)
+++ trunk/libdvdnav/src/dvdread/dvd_udf.c	Sat Apr 19 11:29:18 2008
@@ -802,7 +802,7 @@ uint32_t UDFFindFile( dvd_reader_t *devi
 
     *filesize = 0;
     tokenline[0] = '\0';
-    strcat( tokenline, filename );
+    strncat(tokenline, filename, MAX_UDF_FILE_NAME_LEN - 1);
 
     
     if(!(GetUDFCache(device, PartitionCache, 0, &partition) &&



More information about the DVDnav-discuss mailing list