summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Dahl <post@lespocky.de>2019-10-03 08:35:00 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-10-07 10:14:45 +0200
commitab886a5a7e6c1f135f9f672811920322318003c9 (patch)
tree03ce4804bea35c40d2383b1a4eb1594308b88605
parent3fd38416e7a4817d18173cdebd5b4c5d62c06220 (diff)
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 <post@lespocky.de> Acked-by: Richard Weinberger <richard@nod.at> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--ubi-utils/ubihealthd.c1
1 files changed, 1 insertions, 0 deletions
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, ...)