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:
9fcecd7
)
fix obscure bug in strtoull reading the highest 16 possible values
author
Rich Felker
<dalias@aerifal.cx>
Fri, 2 Mar 2012 17:48:17 +0000
(12:48 -0500)
committer
Rich Felker
<dalias@aerifal.cx>
Fri, 2 Mar 2012 17:48:17 +0000
(12:48 -0500)
src/internal/intparse.c
patch
|
blob
|
history
diff --git
a/src/internal/intparse.c
b/src/internal/intparse.c
index 90aa8339f1a35e48a0dfe55218aafa58a99746ad..ffd06fe06655e845ebbc742a8963dd4ac42f84ef 100644
(file)
--- a/
src/internal/intparse.c
+++ b/
src/internal/intparse.c
@@
-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;