]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
uuidparse: fix getopt crash
authorRuediger Meier <ruediger.meier@ga-group.nl>
Mon, 26 Jun 2017 16:20:06 +0000 (18:20 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 26 Jun 2017 20:38:43 +0000 (22:38 +0200)
$ ./uuidparse --unknownopt
Segmentation fault (core dumped)

Hehe, this is the first real bug found by 'make checkusage'.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
misc-utils/uuidparse.c

index 0938b85592e18d65e68daa8052891038f3f62bf6..09a6b46a8d930d40488dd0b1fb0b4b9d5ba7b4b4 100644 (file)
@@ -299,6 +299,7 @@ int main(int argc, char **argv)
                {"raw",        no_argument,       NULL, 'r'},
                {"version",    no_argument,       NULL, 'V'},
                {"help",       no_argument,       NULL, 'h'},
+               {NULL, 0, NULL, 0}
        };
        static const ul_excl_t excl[] = {
                {'J', 'r'},