From: Yu Watanabe Date: Mon, 23 Jul 2018 14:59:09 +0000 (+0900) Subject: systemctl: set string table size for safety X-Git-Tag: v240~916^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aa8d423ef98ea7f0db26e089690ef178799a09dd;p=thirdparty%2Fsystemd.git systemctl: set string table size for safety --- diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index d9bef997d59..64584e4a862 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",