From ab886a5a7e6c1f135f9f672811920322318003c9 Mon Sep 17 00:00:00 2001 From: Alexander Dahl Date: Thu, 3 Oct 2019 08:35:00 +0200 Subject: 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 --- ubi-utils/ubihealthd.c | 1 + 1 file changed, 1 insertion(+) 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, ...) -- cgit v1.2.3