]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-101178: Fix possible integer overflow in Ascii85 encoder with wrapcol=1 (GH-144778)
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 24 Feb 2026 09:40:24 +0000 (11:40 +0200)
committerGitHub <noreply@github.com>
Tue, 24 Feb 2026 09:40:24 +0000 (11:40 +0200)
commitb32c830d444c85421bd2c0c7af494c9d85485a29
treedcb1dc0b268ca57209b54b76e212a40e3847a3b0
parentfd0400585eb957c7d10812d87a8cb9e1f3c72519
gh-101178: Fix possible integer overflow in Ascii85 encoder with wrapcol=1 (GH-144778)

It could happen if the size of the input is more than 4/5 of sys.maxsize
(only feasible on 32-bit platforms).

Also simplify the integer overflow checks in the Base64 encoder, and
harmonize them with the code for Ascii85 and Base85.
Modules/binascii.c