From 343f73a36d5d49acb00a8c8c91fddbdfaa9ddf14 Mon Sep 17 00:00:00 2001 From: Nao YONASHIRO Date: Fri, 17 May 2019 15:19:09 +0900 Subject: [PATCH] fix: care non-null terminated chunk data --- apache2/msc_logging.c | 1 + 1 file changed, 1 insertion(+) diff --git a/apache2/msc_logging.c b/apache2/msc_logging.c index d50f709e97..61d1a54b7d 100644 --- a/apache2/msc_logging.c +++ b/apache2/msc_logging.c @@ -992,6 +992,7 @@ void sec_audit_logger_json(modsec_rec *msr) { /* Write the sanitized chunk to the log * and advance to the next chunk. */ + chunk->data[chunk->length] = 0; yajl_string(g, chunk->data); chunk_offset += chunk->length; }