diff options
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c index 892f3d1c6e..d5dad1a6a3 100644 --- a/Python/import.c +++ b/Python/import.c @@ -2308,7 +2308,7 @@ PyImport_ExtendInittab(struct _inittab *newtab) _PyMem_SetDefaultAllocator(PYMEM_DOMAIN_RAW, &old_alloc); /* Allocate new memory for the combined table */ - if ((i + n + 1) <= PY_SSIZE_T_MAX / sizeof(struct _inittab)) { + if ((i + n + 1) <= PY_SSIZE_T_MAX / (Py_ssize_t)sizeof(struct _inittab)) { size_t size = sizeof(struct _inittab) * (i + n + 1); p = PyMem_RawRealloc(inittab_copy, size); } |