summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-09-20 18:56:47 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-09-20 18:56:47 (GMT)
commitca8aa4acf6755dd012706e1e38fb737ae83ab5c6 (patch)
tree310b20a536a99dd80657e2d22e07bb1466d0a895 /Parser
parent1c47222a256f2977dcbb36c05dce7a5ae8e6ae06 (diff)
downloadcpython-ca8aa4acf6755dd012706e1e38fb737ae83ab5c6.zip
cpython-ca8aa4acf6755dd012706e1e38fb737ae83ab5c6.tar.gz
cpython-ca8aa4acf6755dd012706e1e38fb737ae83ab5c6.tar.bz2
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')
-rw-r--r--Parser/node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Parser/node.c b/Parser/node.c
index 0dea30f..1e4f0da 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))