]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: don't append a gratuitous space to the end of subsystem
authordjm@openbsd.org <djm@openbsd.org>
Tue, 20 Feb 2024 04:10:03 +0000 (04:10 +0000)
committerDamien Miller <djm@mindrot.org>
Tue, 20 Feb 2024 04:10:55 +0000 (15:10 +1100)
arguments; bz3667

OpenBSD-Commit-ID: e11023aeb3f30b77a674e37b8292c862926d5dc6

servconf.c

index 86c2979360c5c643e9cc6c72cae7709bd220251e..fc873195dff7dfe161b4e972a7b43d9cfbf5fd7c 100644 (file)
@@ -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
@@ -1945,7 +1945,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++;