projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5b8b1c8
)
strtod: Add safety check.
author
Bruno Haible
<bruno@clisp.org>
Tue, 13 Jul 2010 08:07:23 +0000
(10:07 +0200)
committer
Bruno Haible
<bruno@clisp.org>
Tue, 13 Jul 2010 08:07:23 +0000
(10:07 +0200)
ChangeLog
patch
|
blob
|
history
lib/strtod.c
patch
|
blob
|
history
diff --git
a/ChangeLog
b/ChangeLog
index 67609e96c834cf85e32a681c2619c44e66ac7aa1..10d49b197eb6f4da5ee8a0a3a5c45b145b99f843 100644
(file)
--- a/
ChangeLog
+++ b/
ChangeLog
@@
-1,3
+1,8
@@
+2010-07-13 Bruno Haible <bruno@clisp.org>
+
+ strtod: Add safety check.
+ * lib/strtod.c (ldexp): Abort if this dummy replacement gets called.
+
2010-07-12 Bruno Haible <bruno@clisp.org>
Unify tests that set gl_cv_func_ldexpl_no_libm.
2010-07-12 Bruno Haible <bruno@clisp.org>
Unify tests that set gl_cv_func_ldexpl_no_libm.
diff --git
a/lib/strtod.c
b/lib/strtod.c
index 61887598cab0543097841b015906ffe526747013..83b858ae5e7cb23f0c4b1d1bb2ae1263b497be04 100644
(file)
--- a/
lib/strtod.c
+++ b/
lib/strtod.c
@@
-45,7
+45,12
@@
locale_isspace (char c)
#if !HAVE_LDEXP_IN_LIBC
#define ldexp dummy_ldexp
#if !HAVE_LDEXP_IN_LIBC
#define ldexp dummy_ldexp
- static double ldexp (double x, int exponent) { return x + exponent; }
+ /* A dummy definition that will never be invoked. */
+ static double ldexp (double x _GL_UNUSED, int exponent _GL_UNUSED)
+ {
+ abort ();
+ return 0.0;
+ }
#endif
/* Return X * BASE**EXPONENT. Return an extreme value and set errno
#endif
/* Return X * BASE**EXPONENT. Return an extreme value and set errno