diff options
| author | Richard M. Stallman <rms@gnu.org> | 1998-10-10 21:20:22 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 1998-10-10 21:20:22 +0000 |
| commit | 5fb29af43c1c5e7941645b97542a90ae5df18ebf (patch) | |
| tree | e8bb9f81a7a14c26c865b69ede72ae036a4f47fe /lib-src/emacsclient.c | |
| parent | 0ec56a80564f2053e28e0da56e60ea50f50e5241 (diff) | |
| download | emacs-5fb29af43c1c5e7941645b97542a90ae5df18ebf.tar.gz | |
(main): Null-terminate system_name.
Diffstat (limited to 'lib-src/emacsclient.c')
| -rw-r--r-- | lib-src/emacsclient.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 07d446b7aa4..5e95604c4f9 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -225,6 +225,8 @@ main (argc, argv) struct stat statbfr; gethostname (system_name, sizeof (system_name)); + /* system_name must be null-terminated string */ + system_name[sizeof (system_name) - 1] = '\0'; sprintf (server.sun_path, "/tmp/esrv%d-%s", geteuid (), system_name); if (stat (server.sun_path, &statbfr) == -1) |
