From 85af24315855deb4f23ca40ef3052c60fa7deff3 Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 30 Dec 2019 15:27:24 +0100 Subject: [PATCH] autoupdater: Fixed segfault on wrong long option If an autoupdater long option (prefixed with '--') are unknown then a segmentation fault occurs. Example: root@node:~# autoupdater --xyz Segmentation fault [Matthias Schiffer: changed sentinel syntax] --- admin/autoupdater/src/autoupdater.c | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/autoupdater/src/autoupdater.c b/admin/autoupdater/src/autoupdater.c index 7a57700..f06ae88 100644 --- a/admin/autoupdater/src/autoupdater.c +++ b/admin/autoupdater/src/autoupdater.c @@ -112,6 +112,7 @@ static void parse_args(int argc, char *argv[], struct settings *settings) { {"no-action", no_argument, NULL, OPTION_NO_ACTION}, {"force-version", no_argument, NULL, OPTION_FORCE_VERSION}, {"help", no_argument, NULL, OPTION_HELP}, + {} }; while (true) {