Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Check bounds before data
  • Loading branch information
markshannon committed Jun 14, 2022
commit a3ad25914ca877b1a121ccfaa79c63c3ec45738b
4 changes: 2 additions & 2 deletions Objects/codeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@ init_code(PyCodeObject *co, struct _PyCodeConstructor *con)
memcpy(_PyCode_CODE(co), PyBytes_AS_STRING(con->code),
PyBytes_GET_SIZE(con->code));
int entry_point = 0;
while (_Py_OPCODE(_PyCode_CODE(co)[entry_point]) != RESUME &&
entry_point < Py_SIZE(co)) {
while (entry_point < Py_SIZE(co) &&
_Py_OPCODE(_PyCode_CODE(co)[entry_point]) != RESUME) {
entry_point++;
}
co->_co_firsttraceable = entry_point;
Expand Down