summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/arraymodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index bb0a9ed..8bd9a55 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -939,7 +939,8 @@ array_fromfile(self, args)
size_t newbytes;
/* Be careful here about overflow */
if ((newlength = self->ob_size + n) <= 0 ||
- (newbytes = newlength * itemsize) / itemsize != newlength)
+ (newbytes = newlength * itemsize) / itemsize !=
+ (size_t)newlength)
goto nomem;
PyMem_RESIZE(item, char, newbytes);
if (item == NULL) {