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>2013-07-15 09:11:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-15 09:11:14 +0400
commitbf77d35f695030506c1b70f2eb2a2f1225ce14cc (patch)
tree9f291fed3a06aa5fca9d14e13b04fff30302ba51 /source/blender/editors/space_file/filelist.c
parent2b6f35d686a35a347aec93cae2f018b1f7312834 (diff)
fix for bad lengths being passed to string functions.
Diffstat (limited to 'source/blender/editors/space_file/filelist.c')
-rw-r--r--source/blender/editors/space_file/filelist.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 7d7dccdf0e6..4d904ab6551 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -463,10 +463,7 @@ void folderlist_pushdir(ListBase *folderlist, const char *dir)
/* create next folder element */
folder = (FolderList *)MEM_mallocN(sizeof(FolderList), "FolderList");
- folder->foldername = (char *)MEM_mallocN(sizeof(char) * (strlen(dir) + 1), "foldername");
- folder->foldername[0] = '\0';
-
- BLI_strncpy(folder->foldername, dir, FILE_MAXDIR);
+ folder->foldername = BLI_strdup(dir);
/* add it to the end of the list */
BLI_addtail(folderlist, folder);