commit | ca8aa4acf6755dd012706e1e38fb737ae83ab5c6 | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Thu Sep 20 20:56:47 2012 +0200 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Thu Sep 20 20:56:47 2012 +0200 |
tree | 310b20a536a99dd80657e2d22e07bb1466d0a895 | |
parent | 1c47222a256f2977dcbb36c05dce7a5ae8e6ae06 [diff] |
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.
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 @@ * 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))