when result is NULL. This could happen if LDAP initialization failed.
PR 45994. [Dan Poirier <poirier pobox.com>]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@727053
13f79535-47bb-0310-9956-
ffa450edef68
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 <poirier pobox.com>]
+
*) mod_cache: Correctly save Content-Encoding of cachable entity. PR 46401
[Dan Poirier <poirier pobox.com>]
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;
}