From: Jeff Trawick Date: Thu, 18 Oct 2012 15:55:46 +0000 (+0000) Subject: only write the first len chars to syslog, as the buffer may have additional X-Git-Tag: 2.5.0-alpha~6189 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9429e7b6cdfbfb326c963e3125c5a86679cf6a73;p=apache 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 --- 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 }