[PATCH] Core: fixed uninitialized memory access
Jan Seda
nginx-devel at hodor.cz
Thu Sep 29 22:09:12 UTC 2016
Hello.
On 2016-09-29, 09:02:16, Maxim Dounin wrote:
> Thanks for catching this.
>
> Dropping the length returned by getsockname() doesn't look like
> a correct solution though. Instead, teaching ngx_cmp_sockaddr() to
> compare sockaddrs with not-completely-filled sun_path - that is,
> respecting socklen - should be the right way to go.
>
> Please try the following patch:
Seems to work OK. Cannot reproduce the problem anymore. Thanks.
BTW, wouldn't s/ngx_palloc/ngx_pcalloc/ in ngx_set_inherited_sockets()
be prudent anyway?
Also, I see your patch is prepared for abstract namespace sockets. Is
this feature planned soon? I cobbled up a patch for that (attached) and
such sockets now interop with haproxy (abns@ scheme) and socat (with
unix-tightsocklen=0). But it probably is not production-ready.
--
Jan Seda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nginx_abns.diff
Type: text/x-diff
Size: 3691 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20160930/cc7faa25/attachment.bin>
More information about the nginx-devel
mailing list