]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-146196: Fix Undefined Behavior in _PyUnicodeWriter_WriteASCIIString() (#146201)
authorShamil <ashm.tech@proton.me>
Fri, 20 Mar 2026 15:58:41 +0000 (18:58 +0300)
committerGitHub <noreply@github.com>
Fri, 20 Mar 2026 15:58:41 +0000 (15:58 +0000)
commitcd10a2e65c25682095f6ee4a9b9a181938a50d2e
treec9e603cc6f90e348bdaa42abacef031bbd349d82
parent82a24a4442312bdcfc4c799885e8b3e00990f02b
gh-146196: Fix Undefined Behavior in _PyUnicodeWriter_WriteASCIIString() (#146201)

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

Co-authored-by: Victor Stinner <vstinner@python.org>
Misc/NEWS.d/next/Core_and_Builtins/2026-03-20-13-55-14.gh-issue-146196.Zg70Kb.rst [new file with mode: 0644]
Objects/unicode_writer.c