Mercurial > libdvdnav.hg
comparison dvdread/dvd_udf.c @ 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 | 80a6f5839cf7 |
comparison
equal
deleted
inserted
replaced
333:62623c14eb9b | 334:c73a93208d14 |
---|---|
800 char *token; | 800 char *token; |
801 uint8_t filetype; | 801 uint8_t filetype; |
802 | 802 |
803 *filesize = 0; | 803 *filesize = 0; |
804 tokenline[0] = '\0'; | 804 tokenline[0] = '\0'; |
805 strcat( tokenline, filename ); | 805 strncat(tokenline, filename, MAX_UDF_FILE_NAME_LEN - 1); |
806 | 806 |
807 | 807 |
808 if(!(GetUDFCache(device, PartitionCache, 0, &partition) && | 808 if(!(GetUDFCache(device, PartitionCache, 0, &partition) && |
809 GetUDFCache(device, RootICBCache, 0, &RootICB))) { | 809 GetUDFCache(device, RootICBCache, 0, &RootICB))) { |
810 /* Find partition, 0 is the standard location for DVD Video.*/ | 810 /* Find partition, 0 is the standard location for DVD Video.*/ |