From: Alexander Dahl Date: Thu, 3 Oct 2019 06:35:00 +0000 (+0200) Subject: ubihealthd: Add missing sentinel in options array X-Git-Tag: v2.1.2~35 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ab886a5a7e6c1f135f9f672811920322318003c9;p=mtd-utils.git ubihealthd: Add missing sentinel in options array `getopt_long()` requires a null terminated array, otherwise we get segfaults when passing invalid options. Fixes: 7f0e2dc21fb2 ("ubi-utils: Implement a ubihealthd") Signed-off-by: Alexander Dahl Acked-by: Richard Weinberger Signed-off-by: David Oberhollenzer --- diff --git a/ubi-utils/ubihealthd.c b/ubi-utils/ubihealthd.c index 3e665be..f38235b 100644 --- a/ubi-utils/ubihealthd.c +++ b/ubi-utils/ubihealthd.c @@ -56,6 +56,7 @@ static const struct option options[] = { .flag = NULL, .val = 'i' }, + { /* sentinel */ } }; static void dolog(const char *fmt, ...)