SIGN IN SIGN UP

bpo-36819: Fix crashes in built-in encoders with weird error handlers (GH-28593)

If the error handler returns position less or equal than the starting
position of non-encodable characters, most of built-in encoders didn't
properly re-size the output buffer. This led to out-of-bounds writes,
and segfaults.
(cherry picked from commit 18b07d773e09a2719e69aeaa925d5abb7ba0c068)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
M
Miss Islington (bot) committed
d985c8e2e0d38e6905cc27124008eb926254247b
Parent: a7d3de7
Committed by GitHub <noreply@github.com> on 5/2/2022, 9:58:41 AM