]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MINOR] force null-termination of hostname
authorWilly Tarreau <w@1wt.eu>
Fri, 12 Mar 2010 20:58:54 +0000 (21:58 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 12 Mar 2010 20:58:54 +0000 (21:58 +0100)
commit1d21e0a28edef4bf116e904d3c25659c4658aaf0
tree387e70af862a81237006646eaac7c145c3b20e15
parent78caf8449d29589ae9dfce968b00eab804889f73
[MINOR] force null-termination of hostname

Marcello Gorlani reported that at least on FreeBSD, a long hostname
was reported with garbage on the stats page. POSIX does not make it
mandatory for gethostname() to NULL-terminate the string in case of
truncation, and at least FreeBSD appears not to do it. So let's
force null-termination to keep safe.
src/haproxy.c