From aa8d423ef98ea7f0db26e089690ef178799a09dd Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 23 Jul 2018 23:59:09 +0900 Subject: [PATCH] systemctl: set string table size for safety --- src/systemctl/systemctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index d9bef997d5..64584e4a86 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -4927,7 +4927,7 @@ typedef enum SystemctlShowMode{ _SYSTEMCTL_SHOW_MODE_INVALID = -1, } SystemctlShowMode; -static const char* const systemctl_show_mode_table[] = { +static const char* const systemctl_show_mode_table[_SYSTEMCTL_SHOW_MODE_MAX] = { [SYSTEMCTL_SHOW_PROPERTIES] = "show", [SYSTEMCTL_SHOW_STATUS] = "status", [SYSTEMCTL_SHOW_HELP] = "help",