]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
config: Fix config filter sorting order
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 15 May 2025 06:54:18 +0000 (09:54 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 15 May 2025 06:56:41 +0000 (09:56 +0300)
It was somewhat luckily working in glibc, but broke with e.g. musl libc.
This caused a crash at startup.

Broken by 5acdd2b97ed6092d1f0204bdeb3e418180519370

src/config/config-parser.c

index 7b95c31f94da1d5baaa9ce488eb31abe97be0bda..0ae5e46ddbb22eb06f4ff94a5e241057fd0b6081 100644 (file)
@@ -2318,7 +2318,7 @@ static int config_parser_filter_cmp(struct config_filter_parser *const *f1,
                return -1;
        }
        if ((*f2)->create_order <= 1)
-               return -1;
+               return 1;
 
        /* Next, order by the number of named list filters, so more specific
           filters are applied before less specific ones. (Applying is done in