]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
config: config_parse_finish_service_defaults() - Fix for null dereference
authorMarco Bettini <marco.bettini@open-xchange.com>
Wed, 11 Jun 2025 15:09:55 +0000 (15:09 +0000)
committerMarco Bettini <marco.bettini@open-xchange.com>
Fri, 27 Jun 2025 13:54:53 +0000 (13:54 +0000)
Found by Coverity, 40031 Dereference null return value

src/config/config-parser.c

index 654f918594fb150b7a4f91cf05f0d402990d58e4..2a8bbbc88876181799071fc698fd8c4ecbcd7212 100644 (file)
@@ -2286,6 +2286,7 @@ config_parse_finish_service_defaults(struct config_parser_context *ctx)
        for (unsigned int i = 0; i < N_ELEMENTS(service_defaults); i += 2) {
                struct config_parser_key *config_key =
                        hash_table_lookup(ctx->all_keys, service_defaults[i]);
+               i_assert(config_key != NULL);
                struct config_module_parser *module_parser =
                        &ctx->cur_section->filter_parser->module_parsers[config_key->info_idx];
                if (module_parser->change_counters == NULL ||