This has been considered as a security hole on some specialized ml,
but currently the secteam@ doesn't consider that way.
Reviewed by: emaste, des
Sponsored by: Sandvine Incorporated
MFC after: 3 days
loop pointed out by cognet@ that occurs when calling strtod() with a
string representing a number between DBL_MAX and 2*DBL_MAX, when the
rounding mode is anything other than the default.
says they are never supposed to, and the fact that they did could
cause apps that run with unmasked FP exceptions to SIGFPE after a
scanf() or strtod(). The vendor stated that he will not be fixing
this, citing portability concerns.
- Accept the '0x' prefix so strtod("nan(0x...)", NULL) returns the same
thing as gcc's builtin nan("0x...") for such strings.
- Don't return uninitialized memory.
- Finish processing the string up to the closing ')' (provided it's
lexically valid) for compatibility with C99 and *scanf().
appear without leading underscores in gdtoa.h, but this approach avoids
removing that file from the vendor branch and unduly rearranging things.
Prodded by: nectar
- include extra system headers and add appropriate #defines
- use a spinlock to synchronize parts of gdtoa
- protect exported symbols with leading underscores
Reviewed by: bde (briefly), mike (mentor), obrien