Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.9] bpo-36819: Fix crashes in built-in encoders with weird error handlers (GH-28593) #92137

Merged
merged 1 commit into from
May 2, 2022

Conversation

miss-islington
Copy link
Contributor

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 18b07d7)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com

…pythonGH-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 18b07d7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@miss-islington
Copy link
Contributor Author

@serhiy-storchaka: Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington
Copy link
Contributor Author

@serhiy-storchaka: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

@serhiy-storchaka: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

@serhiy-storchaka: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 206f416 into python:3.9 May 2, 2022
@miss-islington miss-islington deleted the backport-18b07d7-3.9 branch May 2, 2022 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants