Repository navigation
Commit f97464b
gh-159739: Fix crash in _PyTuple_Resize() with an invalid size (GH-159804)
_PyTuple_Resize() did not validate newsize for non-empty tuples.
Raise SystemError for a negative size and MemoryError for a too-large size,
like PyTuple_New() already does for the empty-tuple path.
(cherry picked from commit c360884)
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
1 parent 815057b commit f97464b
3 files changed
Lines changed: 16 additions & 1 deletion
File tree
- Lib/test/test_capi
- Misc/NEWS.d/next/C_API
- Objects
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
330 | 334 | | |
331 | 335 | | |
332 | 336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1041 | 1041 | | |
1042 | 1042 | | |
1043 | 1043 | | |
1044 | | - | |
| 1044 | + | |
1045 | 1045 | | |
1046 | 1046 | | |
1047 | 1047 | | |
| |||
1068 | 1068 | | |
1069 | 1069 | | |
1070 | 1070 | | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
1071 | 1079 | | |
1072 | 1080 | | |
1073 | 1081 | | |
| |||
0 commit comments