Skip to content

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 [email protected]
Co-authored-by: Victor Stinner [email protected]

…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 <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
@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.

3 participants