]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-var-expand: Ensure key is not NULL in fn_hash()
authorAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 13 Feb 2025 07:16:21 +0000 (09:16 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 13 Feb 2025 13:02:43 +0000 (15:02 +0200)
Satisfies static analysers

src/lib-var-expand/expansion-filter.c

index 666a4f4fd0fde2921764e367baeb7749bab0d4d0..8a42a6505f8f8e5b9726d21e615012d58a8073dd 100644 (file)
@@ -269,6 +269,7 @@ static int fn_hash_algo(const struct var_expand_statement *stmt, const char *alg
                        if (var_expand_parameter_idx(par) == 0)
                                continue;
                }
+               i_assert(key != NULL);
                if (strcmp(key, "rounds") == 0) {
                        if (var_expand_parameter_number_or_var(state, par,
                                                               &rounds, error_r) < 0)