mirror of
https://github.com/python/cpython.git
synced 2026-10-28 18:35:21 +08:00
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 c3608845b6)
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Source files for various builtin objects