BLI_path api, minor changes to CWD handling
- BLI_current_working_dir's return value must be checked, since it may fail. - BLI_current_working_dir now behaves like getcwd, where a too-small target will return failure. - avoid buffer overrun with BLI_path_cwd, by taking a maxlen arg.
This commit is contained in:
@@ -828,7 +828,7 @@ static void bpy_module_delay_init(PyObject *bpy_proxy)
|
||||
char filename_abs[1024];
|
||||
|
||||
BLI_strncpy(filename_abs, filename_rel, sizeof(filename_abs));
|
||||
BLI_path_cwd(filename_abs);
|
||||
BLI_path_cwd(filename_abs, sizeof(filename_abs));
|
||||
|
||||
argv[0] = filename_abs;
|
||||
argv[1] = NULL;
|
||||
|
||||
Reference in New Issue
Block a user