* James McDonald <[email protected]>, 2015-04-13, 19:06:
I have prepared 5.6-2 with a patch for this which builds on both Linux and kFreeBSD.

Where can I get this new version? I can't see anything on mentors.d.n.
[...]
http://mentors.debian.net/debian/pool/main/c/cwm/cwm_5.6-2.dsc

The relevant change is:

-      char                     hostbuf[HOST_NAME_MAX+1];
+      char                     hostbuf[sysconf(_SC_HOST_NAME_MAX)+1];

I don't think this is correct. At least on FreeBSD 9.0, sysconf(_SC_HOST_NAME_MAX) returns always -1 (which means that there is no limit), so the size of hostbuf is 0.

How about falling back to _POSIX_HOST_NAME_MAX (which is 255, which should hopefully be enough for everybody) if HOST_NAME_MAX is not defined?

--
Jakub Wilk


--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to