Skip to content
Snippets Groups Projects
Unverified Commit f65f3a9d authored by Miss Islington (bot)'s avatar Miss Islington (bot) Committed by GitHub
Browse files

[3.9] gh-97616: list_resize() checks for integer overflow (GH-97617) (GH-97627)


gh-97616: list_resize() checks for integer overflow (GH-97617)

Fix multiplying a list by an integer (list *= int): detect the
integer overflow when the new allocated length is close to the
maximum size.  Issue reported by Jordan Limor.

list_resize() now checks for integer overflow before multiplying the
new allocated length by the list item size (sizeof(PyObject*)).
(cherry picked from commit a5f092f3)

Co-authored-by: default avatarVictor Stinner <vstinner@python.org>
parent d6ef6805
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment