◐ Shell
clean mode source ↗

gh-101178: Fix possible integer overflow in Ascii85 encoder with wrapcol=1 by serhiy-storchaka · Pull Request #144778 · python/cpython

…h wrapcol=1

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.

sethmlarson

brijkapadia pushed a commit to brijkapadia/cpython that referenced this pull request

Feb 28, 2026
…h wrapcol=1 (pythonGH-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.

ljfp pushed a commit to ljfp/cpython that referenced this pull request

Apr 25, 2026
…h wrapcol=1 (pythonGH-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.