Fix potential string buffer overruns.

Note that our library path handling is still rather dodgy on this
regards, shall take some time at some point to seriously sanitize it...
This commit is contained in:
Bastien Montagne
2017-10-08 16:08:00 +02:00
parent cdb0b3b1dc
commit 9ea2a7c02d
2 changed files with 3 additions and 3 deletions

View File

@@ -2203,7 +2203,7 @@ static int file_rename_poll(bContext *C)
poll = false;
}
else {
char dir[FILE_MAX];
char dir[FILE_MAX_LIBEXTRA];
if (filelist_islibrary(sfile->files, dir, NULL)) {
poll = false;
}
@@ -2235,7 +2235,7 @@ static int file_delete_poll(bContext *C)
SpaceFile *sfile = CTX_wm_space_file(C);
if (sfile && sfile->params) {
char dir[FILE_MAX];
char dir[FILE_MAX_LIBEXTRA];
int numfiles = filelist_files_ensure(sfile->files);
int i;
int num_selected = 0;

View File

@@ -282,7 +282,7 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
Scene *scene = CTX_data_scene(C);
PropertyRNA *prop;
WMLinkAppendData *lapp_data;
char path[FILE_MAX_LIBEXTRA], root[FILE_MAXDIR], libname[FILE_MAX], relname[FILE_MAX];
char path[FILE_MAX_LIBEXTRA], root[FILE_MAXDIR], libname[FILE_MAX_LIBEXTRA], relname[FILE_MAX];
char *group, *name;
int totfiles = 0;
short flag;