Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-124248: Fix crash in struct when processing 0p fields #124251

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

brianschubert
Copy link
Contributor

Fixes gh-124248.

Adds special handling for the case when code->size is 0 before attempting to decrement code->size or read the first byte under res.

After this change, 0p should behave like 0s.

Modules/_struct.c Outdated Show resolved Hide resolved
Modules/_struct.c Outdated Show resolved Hide resolved
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.

SystemError/Assertion failure when processing struct with '0p' field
2 participants