◐ Shell
clean mode source ↗

gh-146196: Fix potential Undefined Behavior in _PyUnicodeWriter_WriteASCIIString by ashm-dev · Pull Request #146201 · python/cpython

@bedevere-app Bot mentioned this pull request

Mar 20, 2026

vstinner

@ashm-dev

vstinner

@vstinner

vstinner added a commit to vstinner/cpython that referenced this pull request

Mar 20, 2026
…IString() (python#146201)

Avoid calling memcpy(data + writer->pos, NULL, 0)
which has an undefined behavior.

Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit cd10a2e)

vstinner added a commit that referenced this pull request

Mar 20, 2026
…IIString() (#146201) (#146220)

gh-146196: Fix Undefined Behavior in _PyUnicodeWriter_WriteASCIIString() (#146201)

Avoid calling memcpy(data + writer->pos, NULL, 0)
which has an undefined behavior.


(cherry picked from commit cd10a2e)

Co-authored-by: Shamil <ashm.tech@proton.me>

CuriousLearner added a commit to CuriousLearner/cpython that referenced this pull request

Mar 22, 2026

ljfp pushed a commit to ljfp/cpython that referenced this pull request

Apr 25, 2026
…IString() (python#146201)

Avoid calling memcpy(data + writer->pos, NULL, 0)
which has an undefined behavior.

Co-authored-by: Victor Stinner <vstinner@python.org>