summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2021-08-08 08:49:10 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2021-08-08 08:49:10 +0000
commitcf5d123c34d9466018efb516565ac95c77895b19 (patch)
tree304d8a142a91be121a9f08e14a5b8f541f476069 /usr.bin/ssh/ssh.c
parent61492bb1d364eb90236f4b6bc257f50efe89047e (diff)
xstrdup environment variable used by ForwardAgent. bz#3328 from
goetze at dovetail.com, ok djm@ deraadt@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 30c7e30a2ac..1a553e84ba4 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.565 2021/07/23 05:24:02 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.566 2021/08/08 08:49:09 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1609,7 +1609,7 @@ main(int ac, char **av)
fatal("Invalid ForwardAgent environment variable name %s", cp);
}
if ((p = getenv(cp + 1)) != NULL)
- forward_agent_sock_path = p;
+ forward_agent_sock_path = xstrdup(p);
else
options.forward_agent = 0;
free(cp);