]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Correctly handle var_expand() return codes
authorKarl Fleischmann <karl.fleischmann@open-xchange.com>
Thu, 7 Jul 2022 06:54:24 +0000 (08:54 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Thu, 7 Jul 2022 13:49:27 +0000 (13:49 +0000)
src/lib-storage/mail-user-lua.c

index 4f2aa7fb9237631c4180ad47024a209f43d8d457..39c708bf7553a011d5bd761fe8fba704c0ab14e4 100644 (file)
@@ -135,7 +135,7 @@ static int lua_storage_mail_user_var_expand(lua_State *L)
        const struct var_expand_table *table = mail_user_var_expand_table(user);
        string_t *str = t_str_new(128);
        if (var_expand_with_funcs(str, format, table, mail_user_var_expand_func_table,
-                                 user, &error) < 0) {
+                                 user, &error) <= 0) {
                return luaL_error(L, "var_expand(%s) failed: %s",
                                  format, error);
        }