1 Based on https://gmplib.org/repo/gmp-6.2/raw-rev/561a9c25298e,
4 diff -r e1fd9db13b47 -r 561a9c25298e mpz/inp_raw.c
5 --- a/mpz/inp_raw.c Tue Dec 22 23:49:51 2020 +0100
6 +++ b/mpz/inp_raw.c Thu Oct 21 19:06:49 2021 +0200
9 abs_csize = ABS (csize);
11 + if (UNLIKELY (abs_csize > ~(mp_bitcnt_t) 0 / 8))
12 + return 0; /* Bit size overflows */
14 /* round up to a multiple of limbs */
15 - abs_xsize = (abs_csize*8 + GMP_NUMB_BITS-1) / GMP_NUMB_BITS;
16 + abs_xsize = ((mp_bitcnt_t)abs_csize*8 + GMP_NUMB_BITS-1) / GMP_NUMB_BITS;