]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-var-expand: fn_domain - Copy value before setting state
authorAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 17 Feb 2025 09:45:39 +0000 (11:45 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 17 Feb 2025 18:43:45 +0000 (18:43 +0000)
src/lib-var-expand/expansion-filter.c

index b0ba1ef98a35865d4712dc7ff4f7fa85d0a5b0ee..790005786df35a0dab621780b9d802590eceb3e0 100644 (file)
@@ -1015,7 +1015,7 @@ static int fn_domain(const struct var_expand_statement *stmt,
        /* This function needs to return the whole string after @ character
           even if it contains @ characters. */
        const char *input = str_c(state->transfer);
-       var_expand_state_set_transfer(state, i_strchr_to_next(input, '@'));
+       var_expand_state_set_transfer(state, t_strdup(i_strchr_to_next(input, '@')));
        return 0;
 }