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
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.
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
#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";
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;