summaryrefslogtreecommitdiff
path: root/Parser/node.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-09-20 20:56:47 +0200
committerAntoine Pitrou <solipsis@pitrou.net>2012-09-20 20:56:47 +0200
commitca8aa4acf6755dd012706e1e38fb737ae83ab5c6 (patch)
tree310b20a536a99dd80657e2d22e07bb1466d0a895 /Parser/node.c
parent1c47222a256f2977dcbb36c05dce7a5ae8e6ae06 (diff)
downloadcpython-git-ca8aa4acf6755dd012706e1e38fb737ae83ab5c6.tar.gz
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.
Diffstat (limited to 'Parser/node.c')
-rw-r--r--Parser/node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Parser/node.c b/Parser/node.c
index 0dea30f737..1e4f0dab4b 100644
--- a/Parser/node.c
+++ b/Parser/node.c
@@ -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))