]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-1621: Avoid signed integer overflow in set_table_resize(). (GH-9059) (GH-9199)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 19 Oct 2018 22:48:46 +0000 (15:48 -0700)
committerVictor Stinner <vstinner@redhat.com>
Fri, 19 Oct 2018 22:48:46 +0000 (00:48 +0200)
commita9274f7b3f69519f0746c50f85a68abd926ebe7b
tree9396cd1166fd2cf02a2349d63dee3080829d4341
parentc04347fad936f40cc0bd844e44a71ba88b027b2d
bpo-1621: Avoid signed integer overflow in set_table_resize(). (GH-9059) (GH-9199)

Address a C undefined behavior signed integer overflow issue in set object table resizing.  Our -fwrapv compiler flag and practical reasons why sets are unlikely to get this large should mean this was never an issue but it was incorrect code that generates code analysis warnings.

(cherry picked from commit 6c7d67ce83a62b5f0fe5c53a6df602827451bf7f)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
Misc/NEWS.d/next/Core and Builtins/2018-09-11-15-19-37.bpo-1621.7o19yG.rst [new file with mode: 0644]
Objects/setobject.c