From: Frantisek Sumsal Date: Wed, 25 Oct 2023 17:25:38 +0000 (+0200) Subject: random-seed: terminate the option array X-Git-Tag: v255-rc1~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd741b8893f28ec75fae9648c9e26c2fc887a781;p=thirdparty%2Fsystemd.git random-seed: terminate the option array So we don't crash on invalid options: $ build/systemd-random-seed --foo Segmentation fault (core dumped) --- diff --git a/src/random-seed/random-seed.c b/src/random-seed/random-seed.c index 25d4d3f584c..12eb1f7eac8 100644 --- a/src/random-seed/random-seed.c +++ b/src/random-seed/random-seed.c @@ -348,6 +348,7 @@ static int parse_argv(int argc, char *argv[]) { static const struct option options[] = { { "help", no_argument, NULL, 'h' }, { "version", no_argument, NULL, ARG_VERSION }, + {} }; int c;