提交 33e7781b 编写于 作者: R Rich Felker

fix overread (consuming an extra byte) scanning NAN

bug detected by glib test suite
上级 c6131259
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册