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:
29a15ad
)
fix bugs in ipv4 parsing
author
Rich Felker
<dalias@aerifal.cx>
Thu, 21 Apr 2011 00:00:59 +0000
(20:00 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Thu, 21 Apr 2011 00:00:59 +0000
(20:00 -0400)
src/network/__ipparse.c
patch
|
blob
|
history
diff --git
a/src/network/__ipparse.c
b/src/network/__ipparse.c
index ca9e58902189bd8a7313c83f0acc1caa3e5ded6f..604bdc2f18bf1ca9b5f79a211bd8863a19d5dda7 100644
(file)
--- a/
src/network/__ipparse.c
+++ b/
src/network/__ipparse.c
@@
-14,9
+14,10
@@
int __ipparse(void *dest, int family, const char *s)
if (family == AF_INET6) goto not_v4;
- for (i=0; i<4
&& *s
; i++) {
+ for (i=0; i<4; i++) {
a[i] = strtoul(s, (char **)&z, 0);
if (z==s || (*z && *z != '.')) goto not_v4;
+ if (!*z) break;
s=z+1;
}
switch (i) {