]> git.sur5r.net Git - openldap/commitdiff
ITS#5291
authorQuanah Gibson-Mount <quanah@openldap.org>
Sat, 9 Feb 2008 00:57:28 +0000 (00:57 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Sat, 9 Feb 2008 00:57:28 +0000 (00:57 +0000)
CHANGES
libraries/libldap/search.c

diff --git a/CHANGES b/CHANGES
index f4646ec1bbc7edba5d71cf52840592b02d8fc6ee..2daab2262fdb1ae4077e6c47cdfa8446dec0f355 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,7 @@ OpenLDAP 2.4 Change Log
 OpenLDAP 2.4.8 Engineering
        Fixed ldapmodify verbose logging (ITS#5247)
        Fixed libldap ldap_parse_sasl_bind_result (ITS#5263)
+       Fixed libldap search timeout crash (ITS#5291)
        Fixed slapd include handling (ITS#5276)
        Fixed slapd non-atomic signal variables (ITS#5248)
        Fixed slapd overlay ordering when moving to slapd.d (ITS#5284)
index 2f27eddd6eff8fce4abd505cc02577e7198f082c..7c6f62b977d180d40824f2c2cedb9a0578087c6c 100644 (file)
@@ -358,7 +358,7 @@ ldap_search_st(
            == -1 )
                return( ld->ld_errno );
 
-       if ( ldap_result( ld, msgid, LDAP_MSG_ALL, timeout, res ) == -1 )
+       if ( ldap_result( ld, msgid, LDAP_MSG_ALL, timeout, res ) == -1 || !*res )
                return( ld->ld_errno );
 
        if ( ld->ld_errno == LDAP_TIMEOUT ) {
@@ -386,7 +386,7 @@ ldap_search_s(
            == -1 )
                return( ld->ld_errno );
 
-       if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *) NULL, res ) == -1 || !res )
+       if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *) NULL, res ) == -1 || !*res )
                return( ld->ld_errno );
 
        return( ldap_result2error( ld, *res, 0 ) );