From: Sebastian Harl Date: Fri, 5 Dec 2008 16:11:16 +0000 (+0100) Subject: processes plugin: Fixed a segfault when handling unknown config options. X-Git-Tag: collectd-4.5.2~8 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=0e738514446d5d75df725020137047f7ce5a125a;p=collectd.git processes plugin: Fixed a segfault when handling unknown config options. When using STATIC_ARRAY_SIZE() to determine the number of config keys, the list must not include NULL. Else, the configfile module will handle that as another config key and dereference it in case no previous key matched, i.e. when handling unknown config options. --- diff --git a/src/processes.c b/src/processes.c index f229804d..8cf2562e 100644 --- a/src/processes.c +++ b/src/processes.c @@ -106,8 +106,7 @@ static const char *config_keys[] = { "Process", - "ProcessMatch", - NULL + "ProcessMatch" }; static int config_keys_num = STATIC_ARRAY_SIZE (config_keys);