提交 28c5d46d 编写于 作者: R Rich Felker

fix off-by-one error that caused uninitialized memory read in floatscan

this caused misreading of certain floating point values that are exact
multiples of large powers of ten, unpredictable depending on prior
stack contents.
上级 e5a9b50e
......@@ -244,7 +244,7 @@ static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po
/* Assemble desired bits into floating point variable */
for (y=i=0; i<LD_B1B_DIG; i++) {
if ((a+i & MASK)==z) x[z=(z+1 & MASK)] = 0;
if ((a+i & MASK)==z) x[(z=(z+1 & MASK))-1] = 0;
y = 1000000000.0L * y + x[a+i & MASK];
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册