FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.15] gh-156939: Fix struct.pack('0p', bytes) (GH-157071) by miss-islington · Pull Request #157129 · python/cpython · GitHub

Repository navigation

[3.15] gh-156939: Fix struct.pack('0p', bytes) (GH-157071) - #157129

Open
miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-23525c9-3.15
Open

miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-23525c9-3.15

Conversation

miss-islington commented Sep 7, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

If the Pascal string is empty (size=0), do not write the size prefix.
Previously, a NUL byte was written outsize the buffer (buffer
overflow). In practice, the write remains into allocated memory
and is silently ignored: no memory is corrupted.
(cherry picked from commit 23525c9)

Co-authored-by: Victor Stinner vstinner@python.org

If the Pascal string is empty (size=0), do not write the size prefix.
Previously, a NUL byte was written outsize the buffer (buffer
overflow). In practice, the write remains into allocated memory
and is silently ignored: no memory is corrupted.
(cherry picked from commit 23525c9)

Co-authored-by: Victor Stinner <vstinner@python.org>

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL