From: Jim Jagielski Date: Wed, 26 Sep 2012 14:24:37 +0000 (+0000) Subject: Merge r1373898 from trunk: X-Git-Tag: 2.4.4~556 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f33c1730a89e394c5e792459450a9cf05207e0a;p=apache Merge r1373898 from trunk: Fix crash in packet dump code of mod_proxy_ajp when logging with LogLevel trace7 or trace8. PR 53730 Submitted by: rjung Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1390510 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index cfd1253d14..424cb58593 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.4.4 + *) mod_proxy_ajp: Fix crash in packet dump code when logging + with LogLevel trace7 or trace8. PR 53730. [Rainer Jung] + *) httpd.conf: Removed the configuration directives setting a bad_DNT environment introduced in 2.4.3. The actual directives are commented out in the default conf file. diff --git a/STATUS b/STATUS index 5214620f25..9647ceb357 100644 --- a/STATUS +++ b/STATUS @@ -89,12 +89,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_proxy_ajp: Fix crash in packet dump code when logging - with LogLevel trace7 or trace8. PR 53730. - trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1373898 - 2.4.x patch: trunk patch works. - +1: rjung, jim, trawick - * installwinconf.awk: install.log output tweaks; reduced path convertion trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1375041 http://svn.apache.org/viewvc?view=revision&revision=1375071 diff --git a/modules/proxy/ajp_msg.c b/modules/proxy/ajp_msg.c index 638dfee2d8..71bc1dd902 100644 --- a/modules/proxy/ajp_msg.c +++ b/modules/proxy/ajp_msg.c @@ -21,9 +21,11 @@ APLOG_USE_MODULE(proxy_ajp); #define AJP_MSG_DUMP_BYTES_PER_LINE 16 /* 2 hex digits plus space plus one char per dumped byte */ /* plus prefix plus separator plus '\0' */ -#define AJP_MSG_DUMP_LINE_LENGTH (strlen("XX .") + \ - strlen("XXXX ") + \ - strlen(" - ") + 1) +#define AJP_MSG_DUMP_PREFIX_LENGTH strlen("XXXX ") +#define AJP_MSG_DUMP_LINE_LENGTH ((AJP_MSG_DUMP_BYTES_PER_LINE * \ + strlen("XX .")) + \ + AJP_MSG_DUMP_PREFIX_LENGTH + \ + strlen(" - ") + 1) static char *hex_table = "0123456789ABCDEF"; @@ -70,6 +72,7 @@ apr_status_t ajp_msg_dump(apr_pool_t *pool, ajp_msg_t *msg, char *err, return APR_ENOMEM; } apr_snprintf(current, rl, "%.4lx ", (unsigned long)i); + current += AJP_MSG_DUMP_PREFIX_LENGTH; line_len = len - i; if (line_len > AJP_MSG_DUMP_BYTES_PER_LINE) { line_len = AJP_MSG_DUMP_BYTES_PER_LINE;