mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #15144: Fix possible integer overflow when handling pointers as integer values, by using Py_uintptr_t instead of size_t.
Patch by Serhiy Storchaka.
This commit is contained in:
parent
1c47222a25
commit
ca8aa4acf6
11 changed files with 44 additions and 45 deletions
|
@ -71,7 +71,7 @@ fancy_roundup(int n)
|
|||
* capacity. The code is tricky to avoid that.
|
||||
*/
|
||||
#define XXXROUNDUP(n) ((n) <= 1 ? (n) : \
|
||||
(n) <= 128 ? (((n) + 3) & ~3) : \
|
||||
(n) <= 128 ? _Py_SIZE_ROUND_UP((n), 4) : \
|
||||
fancy_roundup(n))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue