Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-02-12 13:37:37 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-12 13:37:37 +0300
commit6e47ffcc0d076596429b49cb283757b1952f7b86 (patch)
tree872af5ab61a270cc32e4696dc678cad7e514d34c /source/blender/editors/space_file
parent9e9e028f059f29d493dc020dda965a9bea8ffd6b (diff)
fix for uninitialized value in BLI_path_cwd() if PWD wasn't defined and the CWD was longer then 160.
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r--source/blender/editors/space_file/filelist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index ec4733c171c..d9954b584f5 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -833,13 +833,13 @@ void filelist_setfiletypes(struct FileList* filelist)
static void filelist_read_dir(struct FileList* filelist)
{
- char wdir[FILE_MAX];
+ char wdir[FILE_MAX]= "";
if (!filelist) return;
filelist->fidx = 0;
filelist->filelist = 0;
- BLI_getwdN(wdir);
+ BLI_getwdN(wdir, sizeof(wdir)); /* backup cwd to restore after */
BLI_cleanup_dir(G.main->name, filelist->dir);
filelist->numfiles = BLI_getdir(filelist->dir, &(filelist->filelist));