changeset 334:c73a93208d14 src

prevent string overflow in static buffer using strncat(MAX_UDF_FILE_NAME_LEN-1) instead of strcat() ; patch by Erik Hovland - erik hovland org
author nicodvb
date Sat, 19 Apr 2008 09:29:18 +0000
parents 62623c14eb9b
children 0bfe718f75e8
files dvdread/dvd_udf.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dvdread/dvd_udf.c	Sat Apr 19 09:19:24 2008 +0000
+++ b/dvdread/dvd_udf.c	Sat Apr 19 09:29:18 2008 +0000
@@ -802,7 +802,7 @@
 
     *filesize = 0;
     tokenline[0] = '\0';
-    strcat( tokenline, filename );
+    strncat(tokenline, filename, MAX_UDF_FILE_NAME_LEN - 1);
 
     
     if(!(GetUDFCache(device, PartitionCache, 0, &partition) &&