httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1334344 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS server/log.c
Date Sat, 05 May 2012 08:39:31 GMT
Author: sf
Date: Sat May  5 08:39:31 2012
New Revision: 1334344

URL: http://svn.apache.org/viewvc?rev=1334344&view=rev
Log:
Merge r1328950:

Fix segfault in logging if r->useragent_addr or c->client_addr is unset.

Reviewed by: sf, jorton, trawick

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/server/log.c

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

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1334344&r1=1334343&r2=1334344&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Sat May  5 08:39:31 2012
@@ -3,6 +3,9 @@
 
 Changes with Apache 2.4.3
 
+  *) core: Fix segfault in logging if r->useragent_addr or c->client_addr is
+     unset. [Stefan Fritsch]
+
   *) log_server_status: Bring Perl style forward to the present, use
      standard modules, update for new format of server-status output.
      PR 45424. [Richard Bowen, Dave Brondsema, and others]

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1334344&r1=1334343&r2=1334344&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Sat May  5 08:39:31 2012
@@ -88,13 +88,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * core: Fix segfault in logging if r->useragent_addr or c->client_addr is
-    unset. (This can only happen with buggy modules but it happened to me
-    while playing with mod_perl).
-    trunk patch: http://svn.apache.org/viewvc?rev=1328950&view=rev
-    2.4 patch: Trunk patch works
-    +1: sf, jorton, trawick
-
   * mod_ssl: Send speaking-http-on-https-port error response with http 1.0,
     not 0.9. Remove potentially wrong link.  PR 50823
     trunk patches: http://svn.apache.org/viewvc?rev=1328325&view=rev

Modified: httpd/httpd/branches/2.4.x/server/log.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/log.c?rev=1334344&r1=1334343&r2=1334344&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/log.c (original)
+++ httpd/httpd/branches/2.4.x/server/log.c Sat May  5 08:39:31 2012
@@ -563,10 +563,10 @@ static int log_remote_address(const ap_e
 {
     if (info->r && !(arg && *arg == 'c'))
         return apr_snprintf(buf, buflen, "%s:%d", info->r->useragent_ip,
-                            info->r->useragent_addr->port);
+                            info->r->useragent_addr ? info->r->useragent_addr->port
: 0);
     else if (info->c)
         return apr_snprintf(buf, buflen, "%s:%d", info->c->client_ip,
-                            info->c->client_addr->port);
+                            info->c->client_addr ? info->c->client_addr->port
: 0);
     else
         return 0;
 }
@@ -968,12 +968,14 @@ static int do_errorlog_default(const ap_
     if (info->r) {
         len += apr_snprintf(buf + len, buflen - len,
                             info->r->connection->sbh ? "[client %s:%d] " : "[remote
%s:%d] ",
-                            info->r->useragent_ip, info->r->useragent_addr->port);
+                            info->r->useragent_ip,
+                            info->r->useragent_addr ? info->r->useragent_addr->port
: 0);
     }
     else if (info->c) {
         len += apr_snprintf(buf + len, buflen - len,
                             info->c->sbh ? "[client %s:%d] " : "[remote %s:%d] ",
-                            info->c->client_ip, info->c->client_addr->port);
+                            info->c->client_ip,
+                            info->c->client_addr ? info->c->client_addr->port
: 0);
     }
 
     /* the actual error message */



Mime
View raw message