From 5aa689f80d66830181044b2977ded7d3c605cd5f Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Thu, 3 Jul 2008 20:11:30 -0700 Subject: [PATCH] float: fix buffer overrun Fix a buffer overrun; generally causing hexadecimal constants to be incorrectly rejected. --- float.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/float.c b/float.c index 04468ecd..467eafa3 100644 --- a/float.c +++ b/float.c @@ -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; }