[zeromq-dev] zsys_hostname() crash and fix

Pieter Hintjens ph at imatix.com
Thu Mar 5 10:23:05 CET 2015


I've made the fix, thanks for this. We can make a rc2 soon, CZMQ is stable now.

On Wed, Mar 4, 2015 at 10:31 PM, McMillan, Scott A
<scott.a.mcmillan at intel.com> wrote:
> Hi,
>
> I ran into an error similar to the one reported at
> https://github.com/zeromq/czmq/issues/907.
>
> I think the fix in master is insufficient.  The problem is that host is
> NULL, so referencing host->h_name still results in a segfault.
>
> I suggest changing line 971 of src/zsys.c from
>
> return host->h_name? strdup (host->h_name): NULL;
>
>
> to
>
> return host && host->h_name? strdup (host->h_name): NULL;
>
>
> Thanks,
> Scott
>
> P.S. Sorry, I don't have a GitHub account so I can't send a pull request.
> Hopefully this fix is small enough that this won't be necessary.
>
> P.P.S. Any idea when czmq 3.0.0-rc2 will be made available?
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev



More information about the zeromq-dev mailing list