processes plugin: Fixed a segfault when handling unknown config options.
authorSebastian Harl <sh@tokkee.org>
Fri, 5 Dec 2008 16:11:16 +0000 (17:11 +0100)
committerSebastian Harl <sh@tokkee.org>
Sat, 6 Dec 2008 08:58:48 +0000 (09:58 +0100)
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.

src/processes.c

index f229804..8cf2562 100644 (file)
 static const char *config_keys[] =
 {
        "Process",
-       "ProcessMatch",
-       NULL
+       "ProcessMatch"
 };
 static int config_keys_num = STATIC_ARRAY_SIZE (config_keys);