mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-10 04:31:34 -10:00
fixes for stuff_string() bounds checking
This commit is contained in:
1 parent
2f3b5f2910
commit
6ab6cd71ce
38 files changed
+454
-317
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user