Skip to content

Commit d35018e

Browse files
author
Marc Stern
committed
another null check
1 parent 5122f89 commit d35018e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apache2/apache2_config.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232

3333
// Returns the rule id if existing, otherwise the file name & line number
3434
const char* id_log(msre_rule* rule) {
35-
char* id = rule->actionset->id;
35+
assert(rule != NULL);
36+
assert(rule->actionset != NULL);
37+
char* id = rule->actionset->id;
3638
if (!id || !*id || id == NOT_SET_P) id = apr_psprintf(rule->ruleset->mp, "%s (%d)", rule->filename, rule->line_num);
3739
return id;
3840
}

0 commit comments

Comments
 (0)