SIGN IN SIGN UP

[3.14] gh-146196: Fix Undefined Behavior in _PyUnicodeWriter_WriteASCIIString() (#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 cd10a2e65c25682095f6ee4a9b9a181938a50d2e)

Co-authored-by: Shamil <ashm.tech@proton.me>
V
Victor Stinner committed
6e73225c323ee2c1facc013425adf2b786dc8d47
Parent: 8b447fb
Committed by GitHub <noreply@github.com> on 3/20/2026, 4:26:18 PM