Use generic overflow so 64 bit is handled ok.
This commit is contained in:
parent
c60f77d5ab
commit
0c50154c83
|
@ -37,7 +37,7 @@
|
|||
// Detect when a multiply causes an overflow.
|
||||
size_t mp_seq_multiply_len(size_t item_sz, size_t len) {
|
||||
size_t new_len;
|
||||
if (__builtin_umul_overflow(item_sz, len, &new_len)) {
|
||||
if (__builtin_mul_overflow(item_sz, len, &new_len)) {
|
||||
mp_raise_msg(&mp_type_OverflowError, translate("small int overflow"));
|
||||
}
|
||||
return new_len;
|
||||
|
|
Loading…
Reference in New Issue