Libc getnameinfo length requirement

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


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> wrote
>    in <VI1PR0402MB3711C2331551B00ABF42B674A2C50 at>:
> 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>
> ch> and
> ch>
> 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