mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-16 07:56:12 +03:00
another null check
This commit is contained in:
parent
5122f89005
commit
d35018ef3f
@ -32,6 +32,8 @@
|
|||||||
|
|
||||||
// Returns the rule id if existing, otherwise the file name & line number
|
// Returns the rule id if existing, otherwise the file name & line number
|
||||||
const char* id_log(msre_rule* rule) {
|
const char* id_log(msre_rule* rule) {
|
||||||
|
assert(rule != NULL);
|
||||||
|
assert(rule->actionset != NULL);
|
||||||
char* id = rule->actionset->id;
|
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 || id == NOT_SET_P) id = apr_psprintf(rule->ruleset->mp, "%s (%d)", rule->filename, rule->line_num);
|
||||||
return id;
|
return id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user