]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
settings parser: Don't crash if trying to expand a setting under strlist.
authorTimo Sirainen <tss@iki.fi>
Thu, 29 Oct 2009 18:09:10 +0000 (14:09 -0400)
committerTimo Sirainen <tss@iki.fi>
Thu, 29 Oct 2009 18:09:10 +0000 (14:09 -0400)
--HG--
branch : HEAD

src/lib-settings/settings-parser.c

index fb828444682fdbed8b50da692c490141a2f9f501..b961848d8beb4d20abf351d41d345eb96536a873 100644 (file)
@@ -834,6 +834,10 @@ void settings_parse_set_key_expandeded(struct setting_parser_context *ctx,
 
        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) {