From d35018ef3f6de8fecef9949762da7c9b8b91a48b Mon Sep 17 00:00:00 2001 From: Marc Stern Date: Tue, 16 Apr 2024 18:02:06 +0200 Subject: [PATCH] another null check --- apache2/apache2_config.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apache2/apache2_config.c b/apache2/apache2_config.c index 18208c82..f5c3fea7 100644 --- a/apache2/apache2_config.c +++ b/apache2/apache2_config.c @@ -32,7 +32,9 @@ // Returns the rule id if existing, otherwise the file name & line number const char* id_log(msre_rule* rule) { - char* id = rule->actionset->id; + assert(rule != NULL); + assert(rule->actionset != NULL); + char* id = rule->actionset->id; if (!id || !*id || id == NOT_SET_P) id = apr_psprintf(rule->ruleset->mp, "%s (%d)", rule->filename, rule->line_num); return id; }