From 3f6dc30470d5751b83645df180a60cad3e7907ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sun, 11 Mar 2018 09:55:06 +0100 Subject: [PATCH] fix out of bounds write for zero length buffer in gethostname --- src/unistd/gethostname.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unistd/gethostname.c b/src/unistd/gethostname.c index f984b7dd..633ef571 100644 --- a/src/unistd/gethostname.c +++ b/src/unistd/gethostname.c @@ -8,6 +8,6 @@ int gethostname(char *name, size_t len) if (uname(&uts)) return -1; if (len > sizeof uts.nodename) len = sizeof uts.nodename; for (i=0; i