Browse Source

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]
pull/236/head
Jason 2 years ago
committed by Matthias Schiffer
parent
commit
85af243158
No known key found for this signature in database GPG Key ID: 16EF3F64CB201D9C
  1. 1
      admin/autoupdater/src/autoupdater.c

1
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) {

Loading…
Cancel
Save