]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-146196: Fix Undefined Behavior in _PyUnicodeWriter_WriteASCIIString() ...
authorVictor Stinner <vstinner@python.org>
Fri, 20 Mar 2026 16:26:18 +0000 (17:26 +0100)
committerGitHub <noreply@github.com>
Fri, 20 Mar 2026 16:26:18 +0000 (16:26 +0000)
commit6e73225c323ee2c1facc013425adf2b786dc8d47
treed0a939a9c7f001d0fe8ef0c4c8f566f959b40e83
parent8b447fb56cdadc9788c010e84f1581541c74ae98
[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>
Misc/NEWS.d/next/Core_and_Builtins/2026-03-20-13-55-14.gh-issue-146196.Zg70Kb.rst [new file with mode: 0644]
Objects/unicodeobject.c