diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-10-04 17:08:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-04 17:08:24 (GMT) |
commit | f9ce9d4684cc293f40171af8fde253e4762baf9d (patch) | |
tree | ae03e83b33a40fc44636ae5d4d3a04f60f053470 /Misc/NEWS.d/next | |
parent | 90620490c04b6894d5a3f4214ecf5a10b41d25ec (diff) | |
download | cpython-f9ce9d4684cc293f40171af8fde253e4762baf9d.zip cpython-f9ce9d4684cc293f40171af8fde253e4762baf9d.tar.gz cpython-f9ce9d4684cc293f40171af8fde253e4762baf9d.tar.bz2 |
[3.8] gh-97616: list_resize() checks for integer overflow (GH-97617) (GH-97628)
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 a5f092f3c469b674b8d9ccbd4e4377230c9ac7cf)
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Misc/NEWS.d/next')
-rw-r--r-- | Misc/NEWS.d/next/Security/2022-09-28-17-09-37.gh-issue-97616.K1e3Xs.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Security/2022-09-28-17-09-37.gh-issue-97616.K1e3Xs.rst b/Misc/NEWS.d/next/Security/2022-09-28-17-09-37.gh-issue-97616.K1e3Xs.rst new file mode 100644 index 0000000..721427f --- /dev/null +++ b/Misc/NEWS.d/next/Security/2022-09-28-17-09-37.gh-issue-97616.K1e3Xs.rst @@ -0,0 +1,3 @@ +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. Patch by Victor Stinner. |