Merge pull request #3187 from marcstern/v2/pr/logidptr

Invalid pointer access in case rule id == NOT_SET_P
This commit is contained in:
Ervin Hegedus
2024-07-30 16:25:54 +02:00
committed by GitHub

View File

@@ -35,7 +35,7 @@ const char* id_log(msre_rule* rule) {
assert(rule != NULL);
assert(rule->actionset != NULL);
const 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);
if (!id || id == NOT_SET_P || !*id) id = apr_psprintf(rule->ruleset->mp, "%s (%d)", rule->filename, rule->line_num);
return id;
}