From: dtucker@openbsd.org Date: Sun, 8 Aug 2021 08:49:09 +0000 (+0000) Subject: upstream: xstrdup environment variable used by ForwardAgent. bz#3328 X-Git-Tag: V_8_7_P1~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=724eb900ace30661d45db2ba01d0f924d95ecccb;p=thirdparty%2Fopenssh-portable.git upstream: xstrdup environment variable used by ForwardAgent. bz#3328 from goetze at dovetail.com, ok djm@ deraadt@ OpenBSD-Commit-ID: 760320dac1c3b26904284ba417a7d63fccc5e742 --- diff --git a/ssh.c b/ssh.c index b0b8f82f5..533a6aa99 100644 --- a/ssh.c +++ b/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 @@ -1630,7 +1630,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);