mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 21:36:00 +03:00
Fix segfault when logging NULL text during request reading errors and upcoming fix for sending alerts on such errors.
This commit is contained in:
parent
ebdd0400dd
commit
cf024ded05
@ -428,11 +428,11 @@ unsigned char *c2x(unsigned what, unsigned char *where) {
|
||||
}
|
||||
|
||||
char *log_escape(apr_pool_t *mp, const char *text) {
|
||||
return _log_escape(mp, (const unsigned char *)text, strlen(text), 1, 0);
|
||||
return _log_escape(mp, (const unsigned char *)text, text ? strlen(text) : 0, 1, 0);
|
||||
}
|
||||
|
||||
char *log_escape_nq(apr_pool_t *mp, const char *text) {
|
||||
return _log_escape(mp, (const unsigned char *)text, strlen(text), 0, 0);
|
||||
return _log_escape(mp, (const unsigned char *)text, text ? strlen(text) : 0, 0, 0);
|
||||
}
|
||||
|
||||
char *log_escape_ex(apr_pool_t *mp, const char *text, unsigned long int text_length) {
|
||||
@ -444,7 +444,7 @@ char *log_escape_nq_ex(apr_pool_t *mp, const char *text, unsigned long int text_
|
||||
}
|
||||
|
||||
char *log_escape_header_name(apr_pool_t *mp, const char *text) {
|
||||
return _log_escape(mp, (const unsigned char *)text, strlen(text), 0, 1);
|
||||
return _log_escape(mp, (const unsigned char *)text, text ? strlen(text) : 0, 0, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user