Skip to content

Commit 0c50154

Browse files
committed
Use generic overflow so 64 bit is handled ok.
1 parent c60f77d commit 0c50154

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/sequence.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
// Detect when a multiply causes an overflow.
3838
size_t mp_seq_multiply_len(size_t item_sz, size_t len) {
3939
size_t new_len;
40-
if (__builtin_umul_overflow(item_sz, len, &new_len)) {
40+
if (__builtin_mul_overflow(item_sz, len, &new_len)) {
4141
mp_raise_msg(&mp_type_OverflowError, translate("small int overflow"));
4242
}
4343
return new_len;

0 commit comments

Comments
 (0)