From: Eric Covener Date: Fri, 6 Mar 2020 01:14:16 +0000 (+0000) Subject: Merge r1874346, r1874545, r1874558 from trunk: X-Git-Tag: 2.4.42~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec1d567f6b5b9467c3cd7c0b4fa6d76b198aced0;p=thirdparty%2Fapache%2Fhttpd.git Merge r1874346, r1874545, r1874558 from trunk: Avoid printing NULL strings in logs Avoid printing NULL strings in logs "?:" is a GNU extension, use standard syntax spotted by Christophe Jaillet git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1874866 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/filters/mod_brotli.c b/modules/filters/mod_brotli.c index d1d7044ac8f..0f7d770b670 100644 --- a/modules/filters/mod_brotli.c +++ b/modules/filters/mod_brotli.c @@ -419,7 +419,7 @@ static apr_status_t compress_filter(ap_filter_t *f, apr_bucket_brigade *bb) } q = ap_get_token(r->pool, &accepts, 1); ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, - "token: '%s' - q: '%s'", token, q); + "token: '%s' - q: '%s'", token ? token : "NULL", q); } /* No acceptable token found or q=0 */ diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index b079709a26c..00ab23c499b 100644 --- a/modules/filters/mod_deflate.c +++ b/modules/filters/mod_deflate.c @@ -730,7 +730,7 @@ static apr_status_t deflate_out_filter(ap_filter_t *f, } q = ap_get_token(r->pool, &accepts, 1); ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, - "token: '%s' - q: '%s'", token, q); + "token: '%s' - q: '%s'", token ? token : "NULL", q); } /* No acceptable token found or q=0 */