From b5f45d016022b18bb16eccbfd3a63ad17ca0ff2b Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Thu, 18 Jun 2026 19:55:42 +0200 Subject: [PATCH] Update NULL check in config_item_allowed_for_config_file() - no real issue. This is unreachable in current code paths, but could be some day. --- src/conf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/conf.c b/src/conf.c index a022aafa6..1ca930bd8 100644 --- a/src/conf.c +++ b/src/conf.c @@ -2937,6 +2937,8 @@ int config_item_allowed_for_config_file(const char *resource, const char *item) /* Special hardcoded handling for central spamfilter */ if (!strcmp(resource, "central_spamfilter.conf")) { + if (!item) + return 0; if (!strcmp(item, "spamfilter") || !strcmp(item, "ban")) return 1; @@ -2953,7 +2955,7 @@ int config_item_allowed_for_config_file(const char *resource, const char *item) if (rs->restrict_config == NULL) return 1; /* No restrictions */ - if (item == NULL) + if (!item) return 0; if (find_name_list(rs->restrict_config, item))