summaryrefslogtreecommitdiff
path: root/daemon.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-04-23 22:07:57 -0700
committerJunio C Hamano <gitster@pobox.com>2017-04-23 22:07:57 -0700
commit5938454cbc585e0f4bdd9f1cc87c6886a3c1bff3 (patch)
tree72bb28f592f0b3207fcfb25f243287ca6e4b18c3 /daemon.c
parent2d646e3e1fd0ae7f525034abee73d06ac8946729 (diff)
parent5781a9a2703e96b01587bb95ceebcc53f2cee91c (diff)
downloadgit-5938454cbc585e0f4bdd9f1cc87c6886a3c1bff3.tar.gz
Merge branch 'dt/xgethostname-nul-termination'
gethostname(2) may not NUL terminate the buffer if hostname does not fit; unfortunately there is no easy way to see if our buffer was too small, but at least this will make sure we will not end up using garbage past the end of the buffer. * dt/xgethostname-nul-termination: xgethostname: handle long hostnames use HOST_NAME_MAX to size buffers for gethostname(2)
Diffstat (limited to 'daemon.c')
-rw-r--r--daemon.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/daemon.c b/daemon.c
index f70d27b826..ac7181a483 100644
--- a/daemon.c
+++ b/daemon.c
@@ -4,10 +4,6 @@
#include "strbuf.h"
#include "string-list.h"
-#ifndef HOST_NAME_MAX
-#define HOST_NAME_MAX 256
-#endif
-
#ifdef NO_INITGROUPS
#define initgroups(x, y) (0) /* nothing */
#endif