]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
load-fragment: terminate the specifier table (#34421)
authorRonan Pigott <ronan@rjp.ie>
Sun, 15 Sep 2024 03:21:39 +0000 (20:21 -0700)
committerGitHub <noreply@github.com>
Sun, 15 Sep 2024 03:21:39 +0000 (12:21 +0900)
Otherwise an invalid specifier iterates over uninitialized data.

Fixes a bug introduced by 0b40688d1830abc6f59b1f1f67eccd757c23eb09 (v254).

src/core/load-fragment.c

index 7cb8648743cfdbf9104d5273519573c8629195f0..d8fead1ca50d790b3a3995e3c217509970f226d2 100644 (file)
@@ -2728,6 +2728,7 @@ int config_parse_environ(
                 COMMON_CREDS_SPECIFIERS(ltype),
                 { 'h', specifier_user_home,  NULL },
                 { 's', specifier_user_shell, NULL },
+                {}
         };
 
         for (const char *p = rvalue;; ) {