fix for buffer overrun on windows by kjym3 on IRC.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 7 Jun 2012 09:05:51 +0000 (09:05 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 7 Jun 2012 09:05:51 +0000 (09:05 +0000)
source/blender/python/intern/bpy_interface.c

index 0c88c7d9c819d9486e3eb8391dc5baab0439bfb0..73188b3f8302eb45b588dc41099e0ca227bca59f 100644 (file)
@@ -421,7 +421,7 @@ static int python_script_exec(bContext *C, const char *fn, struct Text *text,
 
                                fclose(fp);
 
-                               pystring = MEM_mallocN(strlen(fn) + 36, "pystring");
+                               pystring = MEM_mallocN(strlen(fn) + 37, "pystring");
                                pystring[0] = '\0';
                                sprintf(pystring, "f=open(r'%s');exec(f.read());f.close()", fn);
                                py_result = PyRun_String(pystring, Py_file_input, py_dict, py_dict);