summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2024-02-20 04:10:04 +0000
committerDamien Miller <djm@cvs.openbsd.org>2024-02-20 04:10:04 +0000
commitf172daa087511e11f4a722b53049ee3ca2074a87 (patch)
treec668c7b4d1e29a671be489a5d0334aa54fec7ca4 /usr.bin/ssh
parentb087f6d8e474a1f8e7fe80707f23c560fc90a106 (diff)
don't append a gratuitous space to the end of subsystem arguments;
bz3667
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/servconf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c
index 84b3fb1ead5..7ae6cc0b06c 100644
--- a/usr.bin/ssh/servconf.c
+++ b/usr.bin/ssh/servconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: servconf.c,v 1.403 2023/10/11 22:42:26 djm Exp $ */
+/* $OpenBSD: servconf.c,v 1.404 2024/02/20 04:10:03 djm Exp $ */
/*
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
* All rights reserved
@@ -1888,7 +1888,7 @@ process_server_config_line_depth(ServerOptions *options, char *line,
arg = argv_assemble(1, &arg); /* quote command correctly */
arg2 = argv_assemble(ac, av); /* rest of command */
xasprintf(&options->subsystem_args[options->num_subsystems],
- "%s %s", arg, arg2);
+ "%s%s%s", arg, *arg2 == '\0' ? "" : " ", arg2);
free(arg2);
argv_consume(&ac);
options->num_subsystems++;