From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4128 Path: news.gmane.org!not-for-mail From: Paul Schutte Newsgroups: gmane.linux.lib.musl.general Subject: inet_pton problem Date: Sat, 19 Oct 2013 22:57:00 +0200 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8f3ba36fd914ae04e91e4ae3 X-Trace: ger.gmane.org 1382216230 7238 80.91.229.3 (19 Oct 2013 20:57:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Oct 2013 20:57:10 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4132-gllmg-musl=m.gmane.org@lists.openwall.com Sat Oct 19 22:57:14 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 1VXdaE-0008Uf-Aq for gllmg-musl@plane.gmane.org; Sat, 19 Oct 2013 22:57:14 +0200 Original-Received: (qmail 3328 invoked by uid 550); 19 Oct 2013 20:57:12 -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 3320 invoked from network); 19 Oct 2013 20:57:12 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=o02wMjAQThEC0VXBeBsNK1SclwZvmZ4GlGUjNfVo34A=; b=AhD1h5USnKE+JKv1NCZDCa+Bfcgpvs81MLwwYrZrkY50Y5hI4dyLmvSNtigiaPf9i0 fL34tuDRgjaic0KOoKRRnRxKsL33B4Zj7Vm72ei3fKaNXAZnwUU/JXVhq6+vN/duLlw3 CNZ6CSRzLll9grlD1CogDxkn8cyWOfWMqL52PYAyAY+vnJKW5rP4kkJu6RRmkBSeJtKj qPwrkX4kXn2jCBcjY+B2/KiNazp/c7iq3UuQt4iCkUhRZRkc/EZz7rTMtAJp2W1eFB40 MGn3YNAe9KP6WWBb1JvaLx1oX/vyme+fDU/02Z8yxzWFUN2K52d7cflnUpqboWxPS2IE 0Ldg== X-Received: by 10.180.89.225 with SMTP id br1mr4116027wib.50.1382216220872; Sat, 19 Oct 2013 13:57:00 -0700 (PDT) Xref: news.gmane.org gmane.linux.lib.musl.general:4128 Archived-At: --e89a8f3ba36fd914ae04e91e4ae3 Content-Type: text/plain; charset=ISO-8859-1 Hi, I came across this and believe it is a bug. I have found that when you set str to an IPv4 addr of the from "xxx.xxx.xxx.xxx' while the address family is AF_INET6, then instead of returning a 0 to indicate an invalid IPv6 string, it is converted to gibberish. inet_pton(AF_INET6, "192.168.1.1', &sa) should return 0 if I understand the specification correctly. Regards Paul --e89a8f3ba36fd914ae04e91e4ae3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

I came across this and believe = it is a bug.=A0

I have found that when you set str to an= IPv4 addr of the from "xxx.xxx.xxx.xxx' while the address family = is AF_INET6, then instead of returning a 0 to indicate an invalid IPv6 stri= ng, it is converted to gibberish.

inet_pton(AF_INET6, "192.168.1.1', &sa) should = return 0 if I understand the specification correctly.

Reg= ards
Paul



--e89a8f3ba36fd914ae04e91e4ae3--