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/collada/DocumentImporter.cpp | |
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/collada/DocumentImporter.cpp')
-rw-r--r-- | source/blender/collada/DocumentImporter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index e98f551a097..056d74aabfb 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -884,7 +884,7 @@ bool DocumentImporter::writeImage( const COLLADAFW::Image* image ) char dir[FILE_MAX]; char full_path[FILE_MAX]; - BLI_split_dirfile(filename, dir, NULL); + BLI_split_dirfile(filename, dir, NULL, sizeof(dir), 0); BLI_join_dirfile(full_path, sizeof(full_path), dir, filepath.c_str()); Image *ima = BKE_add_image_file(full_path); if (!ima) { |