Skip to content

Conversation

@miss-islington
Copy link
Contributor

@miss-islingtonmiss-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.

auto-merge was automatically disabled November 14, 2023 21:00

Pull request was closed

@miss-islingtonmiss-islington deleted the backport-9302f05-3.12 branch January 2, 2026 17:54
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviewtype-bugAn unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@miss-islington@vstinner@serhiy-storchaka