about summary refs log tree commit diff
path: root/stdlib
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2011-12-21 23:32:10 +0100
committerAndreas Schwab <schwab@linux-m68k.org>2011-12-21 23:57:15 +0100
commit707f25dfc0a63d264e9da00368cbab5bd0f6a8c9 (patch)
tree8bc262b79f4ca1ea1deaebc76406b0d2e3abc85f /stdlib
parentd2daaa1eb6deaa17f6c9bc110cf7d927d8dcd767 (diff)
downloadglibc-707f25dfc0a63d264e9da00368cbab5bd0f6a8c9.tar.gz
glibc-707f25dfc0a63d264e9da00368cbab5bd0f6a8c9.tar.xz
glibc-707f25dfc0a63d264e9da00368cbab5bd0f6a8c9.zip
Fix division by denominator with more than two limbs in strtold
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/strtod_l.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c
index b3380fdba3..f24d4de73b 100644
--- a/stdlib/strtod_l.c
+++ b/stdlib/strtod_l.c
@@ -1513,6 +1513,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
 	      assert (numsize == densize);
 	      for (i = numsize; i > 0; --i)
 		num[i] = num[i - 1];
+	      num[0] = 0;
 	    }
 
 	  den[densize] = 0;
@@ -1557,6 +1558,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
 	      n0 = num[densize] = num[densize - 1];
 	      for (i = densize - 1; i > 0; --i)
 		num[i] = num[i - 1];
+	      num[0] = 0;
 
 	      got_limb;
 	    }