mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-27 03:11:52 +01:00
Bring in the vendor's fix for a bug in strtod() whereby
strtod("0xyz", &endp) resulted in endp pointing to "0xyz" instead of "xyz". Reported by: Tony Finch <dot@dotat.at> MFC after: 1 week
This commit is contained in:
parent
0ee1368a96
commit
c713eaa603
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=179918
@ -113,8 +113,11 @@ gethex( CONST char **sp, FPI *fpi, Long *exp, Bigint **bp, int sign)
|
||||
e += e1;
|
||||
}
|
||||
*sp = (char*)s;
|
||||
if (zret)
|
||||
return havedig ? STRTOG_Zero : STRTOG_NoNumber;
|
||||
if (zret) {
|
||||
if (!havedig)
|
||||
*sp = s0 - 1;
|
||||
return STRTOG_Zero;
|
||||
}
|
||||
n = s1 - s0 - 1;
|
||||
for(k = 0; n > 7; n >>= 1)
|
||||
k++;
|
||||
|
Loading…
Reference in New Issue
Block a user