Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 76804 invoked from network); 16 Dec 2008 14:08:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Dec 2008 14:08:43 -0000 Received: (qmail 69948 invoked by uid 500); 16 Dec 2008 14:08:56 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 69885 invoked by uid 500); 16 Dec 2008 14:08:55 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 69876 invoked by uid 99); 16 Dec 2008 14:08:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Dec 2008 06:08:55 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Dec 2008 14:08:41 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 551CC23888AF; Tue, 16 Dec 2008 06:08:20 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r727053 - in /httpd/httpd/trunk: CHANGES modules/ldap/util_ldap.c Date: Tue, 16 Dec 2008 14:08:19 -0000 To: cvs@httpd.apache.org From: rederpj@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081216140820.551CC23888AF@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rederpj Date: Tue Dec 16 06:08:19 2008 New Revision: 727053 URL: http://svn.apache.org/viewvc?rev=727053&view=rev Log: *) mod_ldap: Avoid a segfault when result->rc is checked in uldap_connection_init when result is NULL. This could happen if LDAP initialization failed. PR 45994. [Dan Poirier ] Modified: httpd/httpd/trunk/CHANGES httpd/httpd/trunk/modules/ldap/util_ldap.c Modified: httpd/httpd/trunk/CHANGES URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=727053&r1=727052&r2=727053&view=diff ============================================================================== --- httpd/httpd/trunk/CHANGES [utf-8] (original) +++ httpd/httpd/trunk/CHANGES [utf-8] Tue Dec 16 06:08:19 2008 @@ -2,6 +2,10 @@ Changes with Apache 2.3.1 [ When backported to 2.2.x, remove entry from this file ] + *) mod_ldap: Avoid a segfault when result->rc is checked in uldap_connection_init + when result is NULL. This could happen if LDAP initialization failed. + PR 45994. [Dan Poirier ] + *) mod_cache: Correctly save Content-Encoding of cachable entity. PR 46401 [Dan Poirier ] Modified: httpd/httpd/trunk/modules/ldap/util_ldap.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ldap/util_ldap.c?rev=727053&r1=727052&r2=727053&view=diff ============================================================================== --- httpd/httpd/trunk/modules/ldap/util_ldap.c (original) +++ httpd/httpd/trunk/modules/ldap/util_ldap.c Tue Dec 16 06:08:19 2008 @@ -292,7 +292,16 @@ APR_LDAP_NONE, &(result)); - if (result != NULL && result->rc) { + if (NULL == result) { + /* something really bad happened */ + ldc->bound = 0; + if (NULL == ldc->reason) { + ldc->reason = "LDAP: ldap initialization failed"; + } + return(APR_EGENERAL); + } + + if (result->rc) { ldc->reason = result->reason; }