[openssh-commits] [openssh] 02/04: upstream: Make a copy of the user when handling ssh -l, so that
git+noreply at mindrot.org
git+noreply at mindrot.org
Sun Mar 2 22:08:02 AEDT 2025
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 65d2c59628e68e166046efa69e76c1d395a8df6e
Author: dtucker at openbsd.org <dtucker at openbsd.org>
AuthorDate: Sun Mar 2 07:02:49 2025 +0000
upstream: Make a copy of the user when handling ssh -l, so that
later during User token expansion we don't end up freeing a member of argv.
Spotted by anton@'s regress tests.
OpenBSD-Commit-ID: 2f671a4f5726b66d123b88b1fdd1a90581339955
---
ssh.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ssh.c b/ssh.c
index f6505b03..7efa863b 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.606 2025/03/01 06:11:26 dtucker Exp $ */
+/* $OpenBSD: ssh.c,v 1.607 2025/03/02 07:02:49 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -1025,7 +1025,7 @@ main(int ac, char **av)
break;
case 'l':
if (options.user == NULL)
- options.user = optarg;
+ options.user = xstrdup(optarg);
break;
case 'L':
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list