diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-04-25 17:49:21 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-04-25 17:49:21 -0400 |
commit | 3486365e952292987d84313cc7b84a42238ec83f (patch) | |
tree | 1cd3dd10ba649b1174a8ef29e8c323966217837e | |
parent | 34d81974d341e0174d1fc690b4d3e3b9b1767586 (diff) | |
download | musl-3486365e952292987d84313cc7b84a42238ec83f.zip musl-3486365e952292987d84313cc7b84a42238ec83f.tar.gz musl-3486365e952292987d84313cc7b84a42238ec83f.tar.bz2 |
fix bug in ipv6 parsing that prevented parsing a lone "::"
-rw-r--r-- | src/network/inet_pton.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/network/inet_pton.c b/src/network/inet_pton.c index 5affb08..bb16fb9 100644 --- a/src/network/inet_pton.c +++ b/src/network/inet_pton.c @@ -36,10 +36,7 @@ int inet_pton(int af, const char *s, void *a0) return -1; } - if (s[0]==':' && s[1]==':') { - s+=2; - brk=0; - } + if (s[0]==':' && s[1]==':') s++; for (i=0; ; i++, s+=j+1) { if (s[0]==':' && brk<0) { |