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:
Antoine Pitrou 2012-09-20 20:56:47 +02:00
parent 1c47222a25
commit ca8aa4acf6
11 changed files with 44 additions and 45 deletions

View file

@ -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))