From 8aba0b95795d50a926eedc9dbb9a10c8476d0bee Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Sat, 9 Feb 2008 00:57:28 +0000 Subject: [PATCH] ITS#5291 --- CHANGES | 1 + libraries/libldap/search.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index f4646ec1bb..2daab2262f 100644 --- 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) diff --git a/libraries/libldap/search.c b/libraries/libldap/search.c index 2f27eddd6e..7c6f62b977 100644 --- a/libraries/libldap/search.c +++ b/libraries/libldap/search.c @@ -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 ) ); -- 2.39.5