projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c613125
)
fix overread (consuming an extra byte) scanning NAN
author
Rich Felker
<dalias@aerifal.cx>
Sat, 21 Apr 2012 15:57:39 +0000
(11:57 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Sat, 21 Apr 2012 15:57:39 +0000
(11:57 -0400)
bug detected by glib test suite
src/internal/floatscan.c
patch
|
blob
|
history
diff --git
a/src/internal/floatscan.c
b/src/internal/floatscan.c
index 7381e9a4108aa9d0714a90d95586e99d122ae4cc..b260381e7eb5f44041c1900a7bca695feb947505 100644
(file)
--- a/
src/internal/floatscan.c
+++ b/
src/internal/floatscan.c
@@
-436,7
+436,7
@@
long double __floatscan(FILE *f, int prec, int pok)
return sign * INFINITY;
}
if (!i) for (i=0; i<3 && (c|32)=="nan"[i]; i++)
- if (i<
3
) c = shgetc(f);
+ if (i<
2
) c = shgetc(f);
if (i==3) {
return NAN;
}