Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Mar 2018 08:59:14 +0000
From:      Christophe Beauval <christophebeauval@hotmail.com>
To:        Hiroki Sato <hrs@FreeBSD.org>
Cc:        "freebsd-standards@freebsd.org" <freebsd-standards@freebsd.org>
Subject:   Re: Libc getnameinfo length requirement
Message-ID:  <VI1PR0402MB3711EE3C48C96120AA03C7A5A2D90@VI1PR0402MB3711.eurprd04.prod.outlook.com>
In-Reply-To: <20180305.111003.2235120030223011766.hrs@allbsd.org>
References:  <VI1PR0402MB371177DFA52E8CC936FCDD00A2C60@VI1PR0402MB3711.eurprd04.prod.outlook.com> <20180302.111804.1733124916347516747.hrs@allbsd.org> <VI1PR0402MB3711C2331551B00ABF42B674A2C50@VI1PR0402MB3711.eurprd04.prod.outlook.com> <20180305.111003.2235120030223011766.hrs@allbsd.org>

index | next in thread | previous in thread | raw e-mail

Hello

Untested but looks good to me.

Many thanks for addressing this so quickly.

Kind regards

Christophe Beauval


Op 5/03/2018 om 3:10 schreef Hiroki Sato:
> Christophe Beauval <christophebeauval@hotmail.com> wrote
>    in <VI1PR0402MB3711C2331551B00ABF42B674A2C50@VI1PR0402MB3711.eurprd04.prod.outlook.com>:
>
> ch> Hello
> ch>
> ch> There is a typo in the comment: RFC 4018 is mentioned, this should be 4038.
> ch>
> ch> There is also a problem with relying on the sa->sa_len presence and sort
> ch> of undoing two earlier patches from 17th April 2005, where according to
> ch> the commit comment, sa->sa_len is not required by POSIX:
> ch> https://github.com/freebsd/freebsd/commit/90a7ec34ec2cf5e36aeb76ff35c656f880659274#diff-25ee506a989a23ae5d8904e113aa66d7
> ch> and
> ch> https://github.com/freebsd/freebsd/commit/ba35b6aa7602967dbfeb53dc1e32ba1868bd3e98#diff-25ee506a989a23ae5d8904e113aa66d7
> ch> .
>
>   Thank you for the review.  A revised patch to eliminate sa_len
>   dependency and fix a typo is attached.  It now accepts sizeof(struct
>   sockaddr_storage) at a maximum and rejects only too short length
>   depending on sa->sa_family.
>
> -- Hiroki



help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?VI1PR0402MB3711EE3C48C96120AA03C7A5A2D90>