diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-15 07:56:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-15 07:56:05 +0400 |
commit | 317b649bb241726d8be1a700cd0028f28914595d (patch) | |
tree | 8fc5953f8da6481ad72e55d247b144ac72eb2638 /source/blender/blenloader | |
parent | f9c41eaaf80fdddb24d5b95cadb51ac859c2d301 (diff) |
fix for buffer overrun with BLI_split_dirfile(...), was simple to do since many places don't check for filename lengyj of 79 chars which is the limit for the file selector.
Add max dir and file length args.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index cbc312a75e9..6e9e3da3b42 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2678,8 +2678,8 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL if(write_flags & G_FILE_RELATIVE_REMAP) { char dir1[FILE_MAXDIR+FILE_MAXFILE]; char dir2[FILE_MAXDIR+FILE_MAXFILE]; - BLI_split_dirfile(filepath, dir1, NULL); - BLI_split_dirfile(mainvar->name, dir2, NULL); + BLI_split_dirfile(filepath, dir1, NULL, sizeof(dir1), 0); + BLI_split_dirfile(mainvar->name, dir2, NULL, sizeof(dir2), 0); /* just incase there is some subtle difference */ BLI_cleanup_dir(mainvar->name, dir1); |