diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-06-05 11:14:13 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-06-05 11:14:13 +0000 |
commit | 89262c62fe6c49e87f62acfcbb02edc8c8afaf17 (patch) | |
tree | 6a2d7fdbb508f695add67d2c9f017cd17734141b /server-msg.c | |
parent | 18665b8cc90904db87c454346a3234488bb6a813 (diff) | |
download | rtmux-89262c62fe6c49e87f62acfcbb02edc8c8afaf17.tar.gz rtmux-89262c62fe6c49e87f62acfcbb02edc8c8afaf17.tar.bz2 rtmux-89262c62fe6c49e87f62acfcbb02edc8c8afaf17.zip |
Terminate cwd buffer before running xstrdup on it.
Diffstat (limited to 'server-msg.c')
-rw-r--r-- | server-msg.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/server-msg.c b/server-msg.c index 5eaa04db..ef01e100 100644 --- a/server-msg.c +++ b/server-msg.c @@ -196,6 +196,7 @@ server_msg_fn_identify(struct hdr *hdr, struct client *c) c->tty.sy = data.sy; c->cwd = NULL; + data.cwd[(sizeof data.cwd) - 1] = '\0'; if (*data.cwd != '\0') c->cwd = xstrdup(data.cwd); |