From: Quanah Gibson-Mount Date: Mon, 9 Feb 2009 21:37:57 +0000 (+0000) Subject: ITS#5934 X-Git-Tag: OPENLDAP_REL_ENG_2_4_14~19 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e0215acde055c388a9006204e7f88464041d85fc;p=openldap ITS#5934 --- diff --git a/CHANGES b/CHANGES index b371d1f4e0..831dedb5ed 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,7 @@ OpenLDAP 2.4.14 Engineering Added libldap GnuTLS setting random file (ITS#5462) Added libldap alias dereferencing in C API (ITS#5916) Fixed libldap deref handling (ITS#5768) + Fixed libldap NULL pointer deref (ITS#5934) Fixed libldap peer cert memory leak (ITS#5849) Fixed libldap interaction with GnuTLS CN IP-based matches (ITS#5789) Fixed libldap intermediate response behavior (ITS#5896) diff --git a/libraries/libldap/request.c b/libraries/libldap/request.c index 797dc2c3d0..0fdf5c9794 100644 --- a/libraries/libldap/request.c +++ b/libraries/libldap/request.c @@ -452,9 +452,9 @@ ldap_new_connection( LDAP *ld, LDAPURLDesc **srvlist, int use_ldsb, ldap_pvt_thread_mutex_unlock( &ld->ld_conn_mutex ); #endif - if ( lc->lconn_server->lud_exts ) { + if ( connect ) { #ifdef HAVE_TLS - if ( connect ) { + if ( lc->lconn_server->lud_exts ) { int rc, ext = find_tls_ext( lc->lconn_server ); if ( ext ) { LDAPConn *savedefconn; @@ -480,7 +480,6 @@ ldap_new_connection( LDAP *ld, LDAPURLDesc **srvlist, int use_ldsb, return NULL; } } - } #endif }