Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 4 Jun 2018 21:39:21 +0300
From: Timo Teras <timo.teras@....fi>
To: "Laurent Bercot" <ska-dietlibc@...rnet.org>
Cc: musl@...ts.openwall.com, philip.homburg@...e.net
Subject: Re: inet_ntop bug in 1.1.19

On Mon, 04 Jun 2018 14:23:55 +0000
"Laurent Bercot" <ska-dietlibc@...rnet.org> wrote:

> >inet_ntop doesn't conform to RFC 5952 (A Recommendation for IPv6 
> >Address
> >Text Representation).
> >
> >I attached a test program to demonstrate the issue and a patch:
> >$ cc inet_ntop_test.c musl-1.1.19/src/network/inet_ntop.c
> >$ ./a.out
> >Section 4.2.2 test failed: got 2001:db8::1:1:1:1:1, expected
> >2001:db8:0:1:1:1:1:1  
> 
>   https://tools.ietf.org/html/rfc5952#section-4.2.1 says:
>   "The use of the symbol "::" MUST be used to its maximum capability."
> 
>   2001:db8::1:1:1:1:1 is the correct canonical text representation.

The following section 4.2.2  says:

4.2.2.  Handling One 16-Bit 0 Field

   The symbol "::" MUST NOT be used to shorten just one 16-bit 0 field.
   For example, the representation 2001:db8:0:1:1:1:1:1 is correct, but
   2001:db8::1:1:1:1:1 is not correct.

Looks like the test case is taken directly from this.

Timo

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.