File tree 3 files changed +5
-1
lines changed
3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -848,6 +848,7 @@ Ralf Schmitt
848
848
Michael Schneider
849
849
Peter Schneider-Kamp
850
850
Arvin Schnell
851
+ Robin Schreiber
851
852
Chad J. Schroeder
852
853
Sam Schulenburg
853
854
Stefan Schwarzer
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ What's New in Python 3.2.4
10
10
Core and Builtins
11
11
-----------------
12
12
13
+ - Issue #15726: Fix incorrect bounds checking in PyState_FindModule.
14
+ Patch by Robin Schreiber.
15
+
13
16
- Issue #15604: Update uses of PyObject_IsTrue() to check for and handle
14
17
errors correctly. Patch by Serhiy Storchaka.
15
18
Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ PyState_FindModule(struct PyModuleDef* m)
248
248
return NULL ;
249
249
if (state -> modules_by_index == NULL )
250
250
return NULL ;
251
- if (index > PyList_GET_SIZE (state -> modules_by_index ))
251
+ if (index >= PyList_GET_SIZE (state -> modules_by_index ))
252
252
return NULL ;
253
253
res = PyList_GET_ITEM (state -> modules_by_index , index );
254
254
return res == Py_None ? NULL : res ;
You can’t perform that action at this time.
0 commit comments