[zeromq-dev] zsys_hostname() crash and fix

McMillan, Scott A scott.a.mcmillan at intel.com
Wed Mar 4 22:31:05 CET 2015


I ran into an error similar to the one reported at

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;


return host && host->h_name? strdup (host->h_name): NULL;


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?

More information about the zeromq-dev mailing list