Code

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 f229804d95121de08a421ba8f8f30b39feb43a8a..8cf2562e8886b04b2dd7aa27ee681cc5dbb6c5b2 100644 (file)
 static const char *config_keys[] =
 {
        "Process",
-       "ProcessMatch",
-       NULL
+       "ProcessMatch"
 };
 static int config_keys_num = STATIC_ARRAY_SIZE (config_keys);