]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-settings: Fix allocation of boollist elements.
authorsergey.kitov <sergey.kitov@open-xchange.com>
Fri, 9 Feb 2024 13:02:37 +0000 (15:02 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 17 Jan 2025 08:39:59 +0000 (10:39 +0200)
This lead to corruption of strings when memory is reused.

src/lib-settings/settings-parser.c

index b8a6b5acd74f9cf1a163f699a2c6e8b177c23d3d..9a61b5edc8ea4f9f5228eafebf33fa27a2d78cd5 100644 (file)
@@ -422,7 +422,7 @@ int settings_parse_boollist_string(const char *value, pool_t pool,
                return -1;
        }
        if (quoted || str_len(elem) > 0) {
-               elem_dup = settings_section_unescape(p_strdup(pool, str_c(elem)));
+               elem_dup = p_strdup(pool, settings_section_unescape(str_c(elem)));
                array_push_back(dest, &elem_dup);
        }
        return 0;