-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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-126594: Fix typeobject.c wrap_buffer() cast #126754
Conversation
Reject flags smaller than INT_MIN.
@JelleZijlstra: Do you want to review this change? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it's worth adding a test? I understand this condition can perhaps only be triggered on some platforms.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Sure, I added a test. |
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
Reject flags smaller than INT_MIN. (cherry picked from commit 84f07c3) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Reject flags smaller than INT_MIN. (cherry picked from commit 84f07c3) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
GH-127004 is a backport of this pull request to the 3.13 branch. |
GH-127005 is a backport of this pull request to the 3.12 branch. |
Reject flags smaller than INT_MIN. Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Reject flags smaller than INT_MIN.
b"".__buffer__(-2**31 - 1)
#126594