# HG changeset patch # User nicodvb # Date 1208597358 0 # Node ID c73a93208d1471713cc4453f956d52a5bde39b73 # Parent 62623c14eb9bb271f67fb47ad7f62b5c15be7013 prevent string overflow in static buffer using strncat(MAX_UDF_FILE_NAME_LEN-1) instead of strcat() ; patch by Erik Hovland - erik hovland org diff -r 62623c14eb9b -r c73a93208d14 dvdread/dvd_udf.c --- 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) &&