]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tpm2-setup: terminate the option array
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 25 Oct 2023 15:52:19 +0000 (17:52 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 25 Oct 2023 16:18:48 +0000 (18:18 +0200)
Otherwise bad things happen:

$ build/systemd-tpm2-setup --foo
Segmentation fault (core dumped)

src/tpm2-setup/tpm2-setup.c

index 580a18cbbbe2b3b4c4ef61bd7c7fc452b44d1d0e..ebb956ab21412dd078912b0154b0df8f566eaed0 100644 (file)
@@ -63,6 +63,7 @@ static int parse_argv(int argc, char *argv[]) {
                 { "version",     no_argument,       NULL, ARG_VERSION     },
                 { "tpm2-device", required_argument, NULL, ARG_TPM2_DEVICE },
                 { "early",       required_argument, NULL, ARG_EARLY       },
+                {}
         };
 
         int c, r;