From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4143 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: inet_pton Date: Tue, 22 Oct 2013 01:20:16 +0200 Message-ID: <20131021232015.GI1685@port70.net> References: <20131021020817.GL20515@brightrain.aerifal.cx> <20131021222517.GH1685@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1382397624 19047 80.91.229.3 (21 Oct 2013 23:20:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2013 23:20:24 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4147-gllmg-musl=m.gmane.org@lists.openwall.com Tue Oct 22 01:20:29 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1VYOlw-0003TK-8x for gllmg-musl@plane.gmane.org; Tue, 22 Oct 2013 01:20:28 +0200 Original-Received: (qmail 25883 invoked by uid 550); 21 Oct 2013 23:20:27 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 25875 invoked from network); 21 Oct 2013 23:20:27 -0000 Content-Disposition: inline In-Reply-To: <20131021222517.GH1685@port70.net> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:4143 Archived-At: * Szabolcs Nagy [2013-10-22 00:25:17 +0200]: > * Paul Schutte [2013-10-21 21:59:16 +0200]: > > I have tested the suggested fix and this is the result: > > i've added your test cases to libc-test and some more > which revealed further issues > these two changes fix the v6 bugs, but leading zeros of the v4 part are still swallowed incorrectly (even if v4 parsing gets fixed) - if (s[0]==':' && s[1]==':') s++; + if (s[0]==':' && *++s!=':') return 0; - if (s[j]!='.') return 0; + if (s[j]!='.' || (i<6 && brk<0)) return 0;