changeset 10228:988ea1049fa5 HEAD

settings parser: Don't crash if trying to expand a setting under strlist.
author Timo Sirainen <tss@iki.fi>
date Thu, 29 Oct 2009 14:09:10 -0400
parents 89d924850fb1
children 9ecf2adadc4f
files src/lib-settings/settings-parser.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-settings/settings-parser.c	Thu Oct 29 13:59:30 2009 -0400
+++ b/src/lib-settings/settings-parser.c	Thu Oct 29 14:09:10 2009 -0400
@@ -834,6 +834,10 @@
 
 	if (!settings_find_key(ctx, key, &def, &link))
 		return;
+	if (link->info == &strlist_info) {
+		/* parent is strlist, no expansion needed */
+		return;
+	}
 
 	val = PTR_OFFSET(link->set_struct, def->offset);
 	if (def->type == SET_STR_VARS && *val != NULL) {