mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-16 07:56:12 +03:00
Argh! That last one was not meant to be checked in - reverting 281.
This commit is contained in:
parent
e11ff85421
commit
61238ca22f
@ -448,13 +448,9 @@ char *log_escape_header_name(apr_pool_t *mp, const char *text) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *log_escape_raw(apr_pool_t *mp, const unsigned char *text, unsigned long int text_length) {
|
char *log_escape_raw(apr_pool_t *mp, const unsigned char *text, unsigned long int text_length) {
|
||||||
unsigned char *ret;
|
unsigned char *ret = apr_palloc(mp, text_length * 4 + 1);
|
||||||
unsigned long int i, j;
|
unsigned long int i, j;
|
||||||
|
|
||||||
if (text_length <= 0) return NULL;
|
|
||||||
|
|
||||||
ret = apr_palloc(mp, text_length * 4 + 1);
|
|
||||||
|
|
||||||
for (i = 0, j = 0; i < text_length; i++, j += 4) {
|
for (i = 0, j = 0; i < text_length; i++, j += 4) {
|
||||||
apr_snprintf((char *)ret+j, 5, "\\x%02x", text[i]);
|
apr_snprintf((char *)ret+j, 5, "\\x%02x", text[i]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user