提交 b4a07bb4 编写于 作者: R Rich Felker

fix obscure bug in strtoull reading the highest 16 possible values

上级 9fcecd7b
......@@ -87,7 +87,7 @@ int __intparse(struct intparse *v, const void *buf, size_t n)
v->val = v->val * b + d;
if (!n) return 1;
if (d >= b) goto finished;
if (v->val < (UINTMAX_MAX-d)/b)
if (v->val <= (UINTMAX_MAX-d)/b)
v->val = v->val * b + d;
else
v->err = ERANGE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册