fix for buffer overrun on windows by kjym3 on IRC.

This commit is contained in:
2012-06-07 09:05:51 +00:00
parent bc961c90a2
commit ed7dbbdfe9

View 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);