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.12] gh-111942: Fix SystemError in the TextIOWrapper constructor (GH-112061) #112085

Closed

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Nov 14, 2023

In non-debug more the check for the "errors" argument is skipped,
and then PyUnicode_AsUTF8() can fail, but its result was not checked.

(cherry picked from commit 9302f05)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: Victor Stinner vstinner@python.org

…thonGH-112061)

In non-debug more the check for the "errors" argument is skipped,
and then PyUnicode_AsUTF8() can fail, but its result was not checked.

(cherry picked from commit 9302f05)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
@vstinner
Copy link
Member

This PR uses _PyUnicode_AsUTF8NoNUL() which doesn't exist in Python 3.12. I created #112089 backport instead.

@vstinner vstinner closed this Nov 14, 2023
auto-merge was automatically disabled November 14, 2023 21:00

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants