From ca0993583801e040594139161f7a8daed73f9d16 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 25 Jul 2003 12:35:58 +0000 Subject: [PATCH] gethostname can fail :-) svn path=/trunk/kdebase/kdm/; revision=239075 --- client.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client.cpp b/client.cpp index 1a3984650c..aa9971cfc9 100644 --- a/client.cpp +++ b/client.cpp @@ -3058,7 +3058,8 @@ QCString Client::staticWmClientMachine(WId w) result = "localhost"; } else { // special name for the local machine (localhost) - char hostnamebuf[80]; + char hostnamebuf[256]; + hostnamebuf[0] = '\0'; if (gethostname (hostnamebuf, sizeof hostnamebuf) >= 0) { hostnamebuf[sizeof(hostnamebuf)-1] = 0; if (result == hostnamebuf)