From 042cd09fa08b43070d084fe490f598d78544eb25 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 --- 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..9db03f6 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}, + {0, 0, 0, 0} }; while (true) {