mirror of
https://github.com/tmate-io/tmate.git
synced 2024-12-26 16:48:56 +01:00
Terminate cwd buffer before running xstrdup on it.
This commit is contained in:
parent
18665b8cc9
commit
89262c62fe
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user