--- lib-src/emacsclient.c.orig	Thu Apr  9 02:29:18 1998
+++ lib-src/emacsclient.c	Fri Oct  9 23:31:23 1998
@@ -225,6 +225,8 @@
     struct stat statbfr;
 
     gethostname (system_name, sizeof (system_name));
+    system_name[sizeof (system_name) - 1] = '\0';
+		/* system_name must be null-terminated string */
     sprintf (server.sun_path, "/tmp/esrv%d-%s", geteuid (), system_name);
 
     if (stat (server.sun_path, &statbfr) == -1)
--- lib-src/emacsserver.c.orig	Mon Apr  6 19:18:22 1998
+++ lib-src/emacsserver.c	Fri Oct  9 23:31:23 1998
@@ -251,6 +251,8 @@
   server.sun_family = AF_UNIX;
 #ifndef SERVER_HOME_DIR
   gethostname (system_name, sizeof (system_name));
+  system_name[sizeof (system_name) - 1] = '\0';
+		/* system_name must be null-terminated string */
   sprintf (server.sun_path, "/tmp/esrv%d-%s", geteuid (), system_name);
 
   if (unlink (server.sun_path) == -1 && errno != ENOENT)
