mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-17 09:55:28 +03:00
another null check
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user