Libc getnameinfo length requirement

Christophe Beauval christophebeauval at hotmail.com
Tue Mar 6 08:59:18 UTC 2018


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 at hotmail.com> wrote
>    in <VI1PR0402MB3711C2331551B00ABF42B674A2C50 at 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



More information about the freebsd-standards mailing list