Use generic overflow so 64 bit is handled ok.

This commit is contained in:
Scott Shawcroft 2019-02-04 16:11:16 -08:00
parent c60f77d5ab
commit 0c50154c83
No known key found for this signature in database
GPG Key ID: FD0EDC4B6C53CA59
1 changed files with 1 additions and 1 deletions

View File

@ -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;