Skip to content
Snippets Groups Projects
Commit dc3faea0 authored by Damien George's avatar Damien George
Browse files

py/mpz: Fix bug with overflowing C-shift in division routine.

When DIG_SIZE=32, a uint32_t is used to store limbs, and no normalisation
is needed because the MSB is already set, then there will be left and
right shifts (in C) by 32 of a 32-bit variable, leading to undefined
behaviour.  This patch fixes this bug.
parent d59c2e5e
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment