Fix potential buffer overflows from invalid string size arguments
- FILENAME_MAX was used when the output was later limited by FILE_MAX. - Some were passing in incorrect/dummy sizes in a couple of places.
This commit is contained in:
@@ -531,7 +531,7 @@ static bool absolute_convert_foreach_path_cb(BPathForeachPathData *bpath_data,
|
||||
return false; /* Already absolute. */
|
||||
}
|
||||
|
||||
BLI_strncpy(path_dst, path_src, FILENAME_MAX);
|
||||
BLI_strncpy(path_dst, path_src, FILE_MAX);
|
||||
BLI_path_abs(path_dst, data->basedir);
|
||||
if (BLI_path_is_rel(path_dst) == false) {
|
||||
data->count_changed++;
|
||||
|
||||
Reference in New Issue
Block a user