You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2012/09/26 16:24:37 UTC

svn commit: r1390510 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS modules/proxy/ajp_msg.c

Author: jim
Date: Wed Sep 26 14:24:37 2012
New Revision: 1390510

URL: http://svn.apache.org/viewvc?rev=1390510&view=rev
Log:
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

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/proxy/ajp_msg.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1373898

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1390510&r1=1390509&r2=1390510&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Wed Sep 26 14:24:37 2012
@@ -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.

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1390510&r1=1390509&r2=1390510&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Wed Sep 26 14:24:37 2012
@@ -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

Modified: httpd/httpd/branches/2.4.x/modules/proxy/ajp_msg.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/ajp_msg.c?rev=1390510&r1=1390509&r2=1390510&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/ajp_msg.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/ajp_msg.c Wed Sep 26 14:24:37 2012
@@ -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 *po
             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;