mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Fix sign of NaN returned by strtod (bug 23007).
As reported in bug 23007, strtod ignores any sign in the input string in the case of a NaN result. Thes patch fixes this. Tested for x86_64 (in conjunction with tests to be added separately). [BZ #23007] * stdlib/strtod_l.c (____STRTOF_INTERNAL): Return NaN of appropriate sign.
This commit is contained in:
committed by
Joseph Myers
parent
14beef7575
commit
b0debe14fc
@ -1,3 +1,9 @@
|
|||||||
|
2018-06-15 Herman ten Brugge <hermantenbrugge@home.nl>
|
||||||
|
|
||||||
|
[BZ #23007]
|
||||||
|
* stdlib/strtod_l.c (____STRTOF_INTERNAL): Return NaN of
|
||||||
|
appropriate sign.
|
||||||
|
|
||||||
2018-06-14 Florian Weimer <fweimer@redhat.com>
|
2018-06-14 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
[BZ #23290]
|
[BZ #23290]
|
||||||
|
@ -678,7 +678,7 @@ ____STRTOF_INTERNAL (const STRING_TYPE *nptr, STRING_TYPE **endptr, int group,
|
|||||||
if (endptr != NULL)
|
if (endptr != NULL)
|
||||||
*endptr = (STRING_TYPE *) cp;
|
*endptr = (STRING_TYPE *) cp;
|
||||||
|
|
||||||
return retval;
|
return negative ? -retval : retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* It is really a text we do not recognize. */
|
/* It is really a text we do not recognize. */
|
||||||
|
Reference in New Issue
Block a user