mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
another null check
This commit is contained in:
parent
5122f89005
commit
d35018ef3f
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user