mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-04-06 18:30:21 +08:00
Fix undefined behavior when shifting left by 32 bits
See https://bugzilla.nasm.us/show_bug.cgi?id=3392368 Signed-off-by: Michael Bradshaw <mjbshaw@google.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
7b6371b9d3
commit
fd14310469
@ -556,7 +556,7 @@ static bool ieee_flconvert_bin(const char *string, int bits,
|
||||
mp = &mult[MANT_LIMBS]; /* Guard slot */
|
||||
ms += LIMB_BITS;
|
||||
}
|
||||
*mp |= v << ms;
|
||||
*mp |= v << (ms % (sizeof(fp_limb) * CHAR_BIT));
|
||||
ms -= bits;
|
||||
|
||||
if (!seendot)
|
||||
|
Loading…
x
Reference in New Issue
Block a user