From bb21443b3bcd34bb88e84633b88bcc8c5cf9a71b Mon Sep 17 00:00:00 2001 From: Anoop Saldanha Date: Fri, 4 May 2012 21:41:51 +0530 Subject: [PATCH] bug 418 - update http log to escape backslashes --- src/util-print.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/util-print.c b/src/util-print.c index 87d216f..31b8f53 100644 --- a/src/util-print.c +++ b/src/util-print.c @@ -119,8 +119,13 @@ void PrintRawUriBuf(char *retbuf, uint32_t *offset, uint32_t retbuflen, for (u = 0; u < buflen; u++) { if (isprint(buf[u]) && buf[u] != '\"') { - PrintBufferData(retbuf, offset, retbuflen, - "%c", buf[u]); + if (buf[u] == '\\') { + PrintBufferData(retbuf, offset, retbuflen, + "\\\\"); + } else { + PrintBufferData(retbuf, offset, retbuflen, + "%c", buf[u]); + } } else { PrintBufferData(retbuf, offset, retbuflen, "\\x%02X", buf[u]); -- 1.7.1