diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-07-03 20:11:30 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-07-03 20:11:30 -0700 |
commit | 5aa689f80d66830181044b2977ded7d3c605cd5f (patch) | |
tree | dc2f37885aa3a26cfbd5ae54c2f9d23bbd730f68 /float.c | |
parent | 0b826ac316c4d41a25f22a58535326a1d303d59b (diff) | |
download | nasm-5aa689f80d66830181044b2977ded7d3c605cd5f.tar.gz nasm-5aa689f80d66830181044b2977ded7d3c605cd5f.tar.bz2 nasm-5aa689f80d66830181044b2977ded7d3c605cd5f.zip |
float: fix buffer overrun
Fix a buffer overrun; generally causing hexadecimal constants to be
incorrectly rejected.
Diffstat (limited to 'float.c')
-rw-r--r-- | float.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -556,10 +556,10 @@ static bool ieee_flconvert_bin(const char *string, int bits, } if (!seendigit) { - memset(mant, 0, sizeof mult); /* Zero */ + memset(mant, 0, MANT_LIMBS*sizeof(fp_limb)); /* Zero */ *exponent = 0; } else { - memcpy(mant, mult, sizeof mult); + memcpy(mant, mult, MANT_LIMBS*sizeof(fp_limb)); *exponent = twopwr; } |