From b512ba811da29c93b4ff9f7b9ffb1a3a695b77fc Mon Sep 17 00:00:00 2001 From: dtucker Date: Sun, 8 Aug 2021 08:49:09 +0000 Subject: [PATCH] xstrdup environment variable used by ForwardAgent. bz#3328 from goetze at dovetail.com, ok djm@ deraadt@ --- usr.bin/ssh/ssh.c | 4 ++-- 1 file 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 * Copyright (c) 1995 Tatu Ylonen , 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); -- 2.20.1