[PATCH] Fixing buffer over-read when accepting unix domain sockets

Yichun Zhang (agentzh) agentzh at gmail.com
Thu Jul 11 18:33:24 UTC 2013


Hello!

On Thu, Jul 11, 2013 at 4:14 AM, Maxim Dounin wrote:
> This doesn't looks good either.  It looks like on linux unix
> sockaddr can't be printed without socklen argument due to abstract
> namespace sockets (see [1]).  Therefore the only correct solution
> seems to be to change ngx_sock_ntop() interface to accept (and
> use) socklen.
>

Yes, this is cleaner.

I also thought about this approach but dared not change the
ngx_sock_ntop() API that requires updating many places in the code
base (especially those 3rd-party modules using this API) ;)

Regards,
-agentzh



More information about the nginx-devel mailing list