File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -848,6 +848,7 @@ Ralf Schmitt
848848Michael Schneider
849849Peter Schneider-Kamp
850850Arvin Schnell
851+ Robin Schreiber
851852Chad J. Schroeder
852853Sam Schulenburg
853854Stefan Schwarzer
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ What's New in Python 3.2.4
1010Core and Builtins
1111-----------------
1212
13+ - Issue #15726: Fix incorrect bounds checking in PyState_FindModule.
14+ Patch by Robin Schreiber.
15+
1316- Issue #15604: Update uses of PyObject_IsTrue() to check for and handle
1417 errors correctly. Patch by Serhiy Storchaka.
1518
Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ PyState_FindModule(struct PyModuleDef* m)
248248 return NULL ;
249249 if (state -> modules_by_index == NULL )
250250 return NULL ;
251- if (index > PyList_GET_SIZE (state -> modules_by_index ))
251+ if (index >= PyList_GET_SIZE (state -> modules_by_index ))
252252 return NULL ;
253253 res = PyList_GET_ITEM (state -> modules_by_index , index );
254254 return res == Py_None ? NULL : res ;
You can’t perform that action at this time.
0 commit comments