Repository navigation
Commit 86795c8
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 a3f95bb commit 86795c8
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 | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
264 | 268 | | |
265 | 269 | | |
266 | 270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
964 | | - | |
| 964 | + | |
965 | 965 | | |
966 | 966 | | |
967 | 967 | | |
| |||
988 | 988 | | |
989 | 989 | | |
990 | 990 | | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
991 | 999 | | |
992 | 1000 | | |
993 | 1001 | | |
| |||
0 commit comments