[Bf-blender-cvs] [515bdda3d9c] blender-v2.93-release: Fix buffer size mismatch in SCRIPT_OT_python_file_run

Campbell Barton noreply at git.blender.org
Mon Sep 6 09:40:33 CEST 2021


Commit: 515bdda3d9c7938becdf4a761af47087244532de
Author: Campbell Barton
Date:   Tue Aug 24 14:52:02 2021 +1000
Branches: blender-v2.93-release
https://developer.blender.org/rB515bdda3d9c7938becdf4a761af47087244532de

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