diff options
author | Steve Dower <steve.dower@microsoft.com> | 2016-12-03 11:24:02 -0800 |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2016-12-03 11:24:02 -0800 |
commit | 9ca70643e30ef19ceb39644dde496b7dfc7fa6e6 (patch) | |
tree | 9dbef5e103e88ce6c36477306f285c16813e0866 /Python/asdl.c | |
parent | e724fe060b189a4879fd9713a24bbfe6c9eb008e (diff) | |
parent | 43ebbf7db2d3d3297e96693fd91ac8a654631438 (diff) | |
download | cpython-9ca70643e30ef19ceb39644dde496b7dfc7fa6e6.tar.gz |
Issue #28846: Various installer fixes
Diffstat (limited to 'Python/asdl.c')
-rw-r--r-- | Python/asdl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/asdl.c b/Python/asdl.c index df387b2119..c211078118 100644 --- a/Python/asdl.c +++ b/Python/asdl.c @@ -9,14 +9,14 @@ _Py_asdl_seq_new(Py_ssize_t size, PyArena *arena) /* check size is sane */ if (size < 0 || - (size && (((size_t)size - 1) > (PY_SIZE_MAX / sizeof(void *))))) { + (size && (((size_t)size - 1) > (SIZE_MAX / sizeof(void *))))) { PyErr_NoMemory(); return NULL; } n = (size ? (sizeof(void *) * (size - 1)) : 0); /* check if size can be added safely */ - if (n > PY_SIZE_MAX - sizeof(asdl_seq)) { + if (n > SIZE_MAX - sizeof(asdl_seq)) { PyErr_NoMemory(); return NULL; } @@ -40,14 +40,14 @@ _Py_asdl_int_seq_new(Py_ssize_t size, PyArena *arena) /* check size is sane */ if (size < 0 || - (size && (((size_t)size - 1) > (PY_SIZE_MAX / sizeof(void *))))) { + (size && (((size_t)size - 1) > (SIZE_MAX / sizeof(void *))))) { PyErr_NoMemory(); return NULL; } n = (size ? (sizeof(void *) * (size - 1)) : 0); /* check if size can be added safely */ - if (n > PY_SIZE_MAX - sizeof(asdl_seq)) { + if (n > SIZE_MAX - sizeof(asdl_seq)) { PyErr_NoMemory(); return NULL; } |