-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
bpo-36504: Fix signed integer overflow in _ctypes.c's PyCArrayType_new() #12660
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
bpo-36504: Fix signed integer overflow in _ctypes.c's PyCArrayType_new() #12660
Conversation
|
Thanks @ZackerySpytz for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.7. |
|
Hi, @serhiy-storchaka. It seems that the bot failed to create the backports? |
|
Thanks @ZackerySpytz for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7. |
|
Thanks @ZackerySpytz for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
|
Sorry, @ZackerySpytz and @serhiy-storchaka, I could not cleanly backport this to |
|
GH-12676 is a backport of this pull request to the 3.7 branch. |
…w(). (pythonGH-12660) (cherry picked from commit 487b73a) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
Do you mind to create a backport to 2.7 manually if the bug exists in 2.7? |
…w(). (pythonGH-12660) (cherry picked from commit 487b73a)
|
GH-12678 is a backport of this pull request to the 2.7 branch. |
|
I created the backport to 2.7. |
|
|
||
| itemsize = itemdict->size; | ||
| if (length * itemsize < 0) { | ||
| if (length > PY_SSIZE_T_MAX / itemsize) { |
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.
https://bugs.python.org/issue36504