diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-15 09:11:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-15 09:11:14 +0400 |
commit | bf77d35f695030506c1b70f2eb2a2f1225ce14cc (patch) | |
tree | 9f291fed3a06aa5fca9d14e13b04fff30302ba51 /source/blender/editors/space_file | |
parent | 2b6f35d686a35a347aec93cae2f018b1f7312834 (diff) |
fix for bad lengths being passed to string functions.
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 5 |
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); |