[Bf-blender-cvs] [de60205f195] master: Fix buffer size mismatch in SCRIPT_OT_python_file_run
Campbell Barton
noreply at git.blender.org
Tue Aug 24 06:54:44 CEST 2021
Commit: de60205f195b17d36c4e2fb3c3018719b5d9a1d9
Author: Campbell Barton
Date: Tue Aug 24 14:52:02 2021 +1000
Branches: master
https://developer.blender.org/rBde60205f195b17d36c4e2fb3c3018719b5d9a1d9
Fix buffer size mismatch in SCRIPT_OT_python_file_run
Reading paths over 512 bytes would cause a buffer overrun.
===================================================================
M source/blender/editors/space_script/script_edit.c
===================================================================
diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c
index 50cfa2e71c7..0a8700f8180 100644
--- a/source/blender/editors/space_script/script_edit.c
+++ b/source/blender/editors/space_script/script_edit.c
@@ -47,7 +47,7 @@
static int run_pyfile_exec(bContext *C, wmOperator *op)
{
- char path[512];
+ char path[FILE_MAX];
RNA_string_get(op->ptr, "filepath", path);
#ifdef WITH_PYTHON
if (BPY_run_filepath(C, path, op->reports)) {
More information about the Bf-blender-cvs
mailing list