about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--stdlib/strtod_l.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c3ff8320a8..8579ce9539 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-03-29  Ulrich Drepper  <drepper@redhat.com>
+
+	[BZ #5995]
+	* stdlib/strtod_l.c: Use correct sign for result in one more
+	underflow case.
+	Patch by Eric Blake <ebb9@byu.net>.
+
 2008-03-27  Jakub Jelinek  <jakub@redhat.com>
 
 	* sysdeps/unix/sysv/linux/wordsize-64/syscalls.list: Add open
diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c
index 9c2f86a32b..09a8f9bb3b 100644
--- a/stdlib/strtod_l.c
+++ b/stdlib/strtod_l.c
@@ -1028,7 +1028,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
   if (__builtin_expect (exponent < MIN_10_EXP - (DIG + 1), 0))
     {
       __set_errno (ERANGE);
-      return 0.0;
+      return negative ? -0.0 : 0.0;
     }
 
   if (int_no > 0)