Skip to content

gh-157710: Detect overflow in PyUnicodeWriter_Finish() - #157715

Merged
vstinner merged 3 commits into
python:mainfrom
vstinner:unicode_overflow
Sep 18, 2026
Merged

vstinner merged 3 commits into
python:mainfrom
vstinner:unicode_overflow

Conversation

@vstinner

@vstinner vstinner commented Sep 17, 2026

Copy link
Copy Markdown
Member

Check if the trailing null character has been modified to detect buffer overflow in C extensions.

_PyUnicode_CheckConsistency() now always check if the trailing null character has been overridden to detect buffer overflow. Previously, it was only been checked if check_content parameter was non-zero.

Check f the trailing null character has been modified to detect
buffer overflow in C extensions.

_PyUnicode_CheckConsistency() now always check if the trailing null
character has been overridden to detect buffer overflow. Previously,
it was only been checked if check_content parameter was non-zero.
@vstinner
vstinner enabled auto-merge (squash) September 18, 2026 01:43
@vstinner
vstinner merged commit 2385254 into python:main Sep 18, 2026
71 of 73 checks passed
@vstinner
vstinner deleted the unicode_overflow branch September 18, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant