[Bf-blender-cvs] [0367ce4b19d] blender-v2.83-release: Fix buffer size mismatch in SCRIPT_OT_python_file_run
Campbell Barton
noreply at git.blender.org
Mon Aug 30 11:35:42 CEST 2021
Commit: 0367ce4b19d4dfc9823bbcc1a783d1faf63c7a92
Author: Campbell Barton
Date: Tue Aug 24 14:52:02 2021 +1000
Branches: blender-v2.83-release
https://developer.blender.org/rB0367ce4b19d4dfc9823bbcc1a783d1faf63c7a92
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 e9ed1cec228..832139a913d 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_execute_filepath(C, path, op->reports)) {
More information about the Bf-blender-cvs
mailing list