Skip to content

gh-156939: Detect PyBytesWriter buffer overflow earlier - #157385

Merged
vstinner merged 3 commits into
python:mainfrom
vstinner:check_canary
Sep 13, 2026
Merged

gh-156939: Detect PyBytesWriter buffer overflow earlier#157385
vstinner merged 3 commits into
python:mainfrom
vstinner:check_canary

Conversation

@vstinner

@vstinner vstinner commented Sep 13, 2026

Copy link
Copy Markdown
Member

Check the canary byte in all PyBytesWriter methods, not only in PyBytesWriter_Finish().

Add a discard() method to the _testcapi wrapper.

Check the canary byte in all PyBytesWriter methods, not only in
PyBytesWriter_Finish().

Add a discard() method to the _testcapi wrapper.
@vstinner
vstinner merged commit 58cdff7 into python:main Sep 13, 2026
51 checks passed
@vstinner
vstinner deleted the check_canary branch September 13, 2026 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant