From 9429e7b6cdfbfb326c963e3125c5a86679cf6a73 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Thu, 18 Oct 2012 15:55:46 +0000 Subject: [PATCH] only write the first len chars to syslog, as the buffer may have additional text added speculatively git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1399708 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ server/log.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index b47444d69b..c311e42b88 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) syslog logging: Remove stray ", referer" at the end of some messages. + [Jeff Trawick] + *) configure: Fix processing of --disable-FEATURE for various features. [Jeff Trawick] diff --git a/server/log.c b/server/log.c index 60e253fb5e..6ec5f4f5b9 100644 --- a/server/log.c +++ b/server/log.c @@ -1088,7 +1088,8 @@ static void write_logline(char *errstr, apr_size_t len, apr_file_t *logf, } #ifdef HAVE_SYSLOG else { - syslog(level < LOG_PRIMASK ? level : APLOG_DEBUG, "%s", errstr); + syslog(level < LOG_PRIMASK ? level : APLOG_DEBUG, "%.*s", + (int)len, errstr); } #endif } -- 2.40.0