summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0e73851)
raw | patch | inline | side by side (parent: 0e73851)
author | Sebastian Harl <sh@tokkee.org> | |
Fri, 5 Dec 2008 16:22:53 +0000 (17:22 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sat, 6 Dec 2008 08:58:48 +0000 (09:58 +0100) |
If a registered config key equals NULL, it is now ignored. Before, this would
cause a segfault. As this has happened a few times in the past, we not handle
it sanely.
cause a segfault. As this has happened a few times in the past, we not handle
it sanely.
src/configfile.c | patch | blob | history |
diff --git a/src/configfile.c b/src/configfile.c
index b1030fe939098ce818bb44e88a87c7137164df14..bb57ca26a23e77444b8bafb157e385b8468c84e5 100644 (file)
--- a/src/configfile.c
+++ b/src/configfile.c
for (i = 0; i < cf_cb->keys_num; i++)
{
- if (strcasecmp (cf_cb->keys[i], key) == 0)
+ if ((cf_cb->keys[i] != NULL)
+ && (strcasecmp (cf_cb->keys[i], key) == 0))
{
ret = (*cf_cb->callback) (key, value);
break;