aboutsummaryrefslogtreecommitdiff
path: root/stdlib/strtod_l.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2010-09-01 12:38:44 -0700
committerUlrich Drepper <drepper@redhat.com>2010-09-01 12:38:44 -0700
commita726d7960e8a4ac784131f591114a0ef14246d8b (patch)
tree3402c5f7cb2d54f27ac4e782e8e514ee18b266b3 /stdlib/strtod_l.c
parentf2933da978abcf1ef4b9a66e96772c1b8bcdb142 (diff)
downloadglibc-a726d7960e8a4ac784131f591114a0ef14246d8b.tar
glibc-a726d7960e8a4ac784131f591114a0ef14246d8b.tar.gz
glibc-a726d7960e8a4ac784131f591114a0ef14246d8b.tar.bz2
glibc-a726d7960e8a4ac784131f591114a0ef14246d8b.zip
Fix array overflow in floating point parser
Diffstat (limited to 'stdlib/strtod_l.c')
-rw-r--r--stdlib/strtod_l.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c
index cde1280e55..537d1fbc61 100644
--- a/stdlib/strtod_l.c
+++ b/stdlib/strtod_l.c
@@ -1491,7 +1491,9 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
register int i;
(void) __mpn_lshift (&retval[used
/ BITS_PER_MP_LIMB],
- retval, RETURN_LIMB_SIZE,
+ retval,
+ (RETURN_LIMB_SIZE
+ - used / BITS_PER_MP_LIMB),
used % BITS_PER_MP_LIMB);
for (i = used / BITS_PER_MP_LIMB - 1; i >= 0; --i)
retval[i] = 0;