diff options
author | 2010-09-01 12:38:44 -0700 | |
---|---|---|
committer | 2010-11-09 02:12:46 +0100 | |
commit | 5f353d1e05659d8515511f28b875b9fd10c1a661 (patch) | |
tree | 548641655af2f4957b9b35ba96b369a433f2e682 | |
parent | Actually make it possible to user the default name server. (diff) | |
download | glibc-5f353d1e05659d8515511f28b875b9fd10c1a661.tar.xz glibc-5f353d1e05659d8515511f28b875b9fd10c1a661.zip |
Fix array overflow in floating point parser
(cherry picked from commit a726d7960e8a4ac784131f591114a0ef14246d8b)
Diffstat (limited to '')
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | stdlib/strtod_l.c | 4 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2010-08-31 Andreas Schwab <schwab@redhat.com> + + [BZ #7066] + * stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix array overflow when + shifting retval into place. + 2010-09-14 Ulrich Drepper <drepper@redhat.com> * resolv/res_init.c (__res_vinit): Count the default server we added. diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c index 9ddfa3fa66..099fcf751e 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; |