authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-06-11 17:33:01+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-06-11 22:26:26+02:00
log1af28aebd7385104d31f8a7e5e307600b97cad5a
tree201edd0ef2326967bf4483a04970c17318587448
parent1e6ee420f73fe5eea040f24ef7efb417c5eeb3ed
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

musl, wasi-libc: apply Rich Felker's floatscan.c patch fixing strtod() rounding

https://www.openwall.com/lists/musl/2026/05/21/3

2 files changed, 2 insertions(+), 2 deletions(-)

lib/libc/musl/src/internal/floatscan.c+1-1
......@@ -347,7 +347,7 @@ static long double hexfloat(FILE *f, int bits, int emin, int sign, int pok)
347347 else d = c-'0';
348348 if (dc<8) {
349349 x = x*16 + d;
350 } else if (dc < LDBL_MANT_DIG/4+1) {
350 } else if (dc < (LDBL_MANT_DIG+3)/4+1) {
351351 y += d*(scale/=16);
352352 } else if (d && !gottail) {
353353 y += 0.5*scale;
lib/libc/wasi/libc-top-half/musl/src/internal/floatscan.c+1-1
......@@ -388,7 +388,7 @@ static long double hexfloat(FILE *f, int bits, int emin, int sign, int pok)
388388 else d = c-'0';
389389 if (dc<8) {
390390 x = x*16 + d;
391 } else if (dc < LDBL_MANT_DIG/4+1) {
391 } else if (dc < (LDBL_MANT_DIG+3)/4+1) {
392392 y += d*(scale/=16);
393393 } else if (d && !gottail) {
394394 y += 0.5*scale;