fixes for stuff_string() bounds checking

git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@3549 387891d4-d844-0410-90c0-e4c51a9137d3
This commit is contained in:
taylor authored and niffiwan committed 2015-04-29 18:42:34 +10:00
1 parent c29aa3e9e3
commit 471b758539
38 files changed
+451 -319

No files matched your search

+3 -3
View File
@@ -648,8 +648,8 @@ PyBytecode python_parse()
sprintf(debug_str, "parse_python(ln) %d", Total_lines_parsed++);
//Stuff it
char buf[PARSE_BUF_SIZE] = {0};
stuff_string(buf, F_RAW, NULL, sizeof(buf)-1);
char buf[PARSE_BUF_SIZE];
stuff_string(buf, F_RAW, sizeof(buf));
//Compile & return it
return PyBytecode(Py_CompileString(buf, debug_str, Py_eval_input));
@@ -683,4 +683,4 @@ PyResult py_session_evaluate(PySession* session, PyBytecode* code)
return PyResult(NULL);
}
#endif
#endif