Skip to content

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

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:writer_canary2
Sep 15, 2026
Merged

vstinner merged 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.
@vstinner
vstinner enabled auto-merge (squash) September 15, 2026 14:41
@vstinner
vstinner merged commit 3b1057d into python:main Sep 15, 2026
96 of 98 checks passed
@vstinner
vstinner deleted the writer_canary2 branch September 15, 2026 15:10
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