httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r1209417 - /httpd/httpd/trunk/server/listen.c
Date Fri, 02 Dec 2011 11:28:45 GMT
Author: jorton
Date: Fri Dec  2 11:28:44 2011
New Revision: 1209417

URL: http://svn.apache.org/viewvc?rev=1209417&view=rev
Log:
* server/listen.c (open_listeners): Fix logic error caught by
  Coverity; possible NULL pointer deref at startup with a
  particular (and unlikely) listener/system config.

Modified:
    httpd/httpd/trunk/server/listen.c

Modified: httpd/httpd/trunk/server/listen.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/listen.c?rev=1209417&r1=1209416&r2=1209417&view=diff
==============================================================================
--- httpd/httpd/trunk/server/listen.c (original)
+++ httpd/httpd/trunk/server/listen.c Fri Dec  2 11:28:44 2011
@@ -416,7 +416,7 @@ static int open_listeners(apr_pool_t *po
              * listen (which would generate an error). IPv4 will be handled
              * on the established IPv6 socket.
              */
-            if (IS_INADDR_ANY(lr->bind_addr)) {
+            if (IS_INADDR_ANY(lr->bind_addr) && previous) {
                 for (cur = ap_listeners; cur != lr; cur = cur->next) {
                     if (lr->bind_addr->port == cur->bind_addr->port
                         && IS_IN6ADDR_ANY(cur->bind_addr)



Mime
View raw message