changeset 13002:74248914cf40

lib-settings: Crashfix for broken settings under strlist.
author Timo Sirainen <tss@iki.fi>
date Mon, 09 May 2011 19:25:44 +0300
parents 3ada82147977
children 4e99454e2c7c
files src/lib-settings/settings-parser.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-settings/settings-parser.c	Mon May 09 19:08:43 2011 +0300
+++ b/src/lib-settings/settings-parser.c	Mon May 09 19:25:44 2011 +0300
@@ -696,7 +696,8 @@
 		if (parent_def == NULL) {
 			/* we'll get here with e.g. "plugin/a/b=val".
 			   not sure if we should ever do anything here.. */
-			if (strcmp(parent_link->full_key, parent_key) != 0)
+			if (parent_link->full_key == NULL ||
+			    strcmp(parent_link->full_key, parent_key) != 0)
 				return FALSE;
 		} else {
 			if (parent_def->type != SET_STRLIST)