Skip to content

gh-156939: Clear newly allocated bytes in PyBytesWriter_Resize() - #157455

Open
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:writer_canary2
Open

gh-156939: Clear newly allocated bytes in PyBytesWriter_Resize()#157455
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:writer_canary2

Conversation

@vstinner

@vstinner vstinner commented Sep 13, 2026

Copy link
Copy Markdown
Member

Adjust the logic to set newly allocated bytes to a known pattern (PyBytesWrite_NEW_BYTE). Only copy 'size' bytes from the small buffer to the new bytes/bytearray object.

Adjust the logic to set newly allocated bytes to a known pattern
(PyBytesWrite_NEW_BYTE). Only copy 'size' bytes from the small buffer
to the new bytes/bytearray object.
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