From: Aki Tuomi Date: Thu, 13 Feb 2025 07:16:21 +0000 (+0200) Subject: lib-var-expand: Ensure key is not NULL in fn_hash() X-Git-Tag: 2.4.1~205 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=976e659298fef56185ca561649d1963b04bc824b;p=thirdparty%2Fdovecot%2Fcore.git lib-var-expand: Ensure key is not NULL in fn_hash() Satisfies static analysers --- diff --git a/src/lib-var-expand/expansion-filter.c b/src/lib-var-expand/expansion-filter.c index 666a4f4fd0..8a42a6505f 100644 --- a/src/lib-var-expand/expansion-filter.c +++ b/src/lib-var-expand/expansion-filter.c @@ -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)