]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: correctly check subsystem command is not the empty string
authordjm@openbsd.org <djm@openbsd.org>
Fri, 19 Dec 2025 01:26:39 +0000 (01:26 +0000)
committerDamien Miller <djm@mindrot.org>
Fri, 19 Dec 2025 01:29:45 +0000 (12:29 +1100)
(was repeatedly checking the subsystem name) spotted by Coverity (CID 898836)

OpenBSD-Commit-ID: dabea2b499de8280f76f7291dd52086df6831cb0

servconf.c

index 3452e1a3013ca9b1a9cbd53dcfd763605ed4947b..94184b5b479e5eb2f2f92b19f4cd90faa0967678 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: servconf.c,v 1.442 2025/12/19 00:56:34 djm Exp $ */
+/* $OpenBSD: servconf.c,v 1.443 2025/12/19 01:26:39 djm Exp $ */
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
@@ -1959,7 +1959,7 @@ process_server_config_line_depth(ServerOptions *options, char *line,
 
        case sSubsystem:
                if ((arg = argv_next(&ac, &av)) == NULL || *arg == '\0' ||
-                  ((arg2 = argv_next(&ac, &av)) == NULL || *arg == '\0'))
+                  ((arg2 = argv_next(&ac, &av)) == NULL || *arg2 == '\0'))
                        fatal("%s line %d: %s missing argument.",
                            filename, linenum, keyword);
                if (!*activep) {