From: Kurt Zeilenga Date: Thu, 27 Jul 2000 23:44:44 +0000 (+0000) Subject: From: vtag@novell.com X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2333 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=33fb0e055b035fd8e4a85dbdce8e21cf428095c2;p=openldap From: vtag@novell.com Subject: Bug in ldap_parse_result function (ITS#643) If a user is using ldap result to obtain search results one message at a time and calls ldap_parse_result on one of those messages, i.e. the message chain does not have an LDAP_RES_SEARCH_RESULT message in the chain, ldap_parse_result returns a LDAP_DECODING_ERROR instead of LDAP_NO_RESULTS_RETURNED. --- diff --git a/libraries/libldap/error.c b/libraries/libldap/error.c index 90fcac082f..61ae88f4b6 100644 --- a/libraries/libldap/error.c +++ b/libraries/libldap/error.c @@ -231,7 +231,7 @@ ldap_parse_result( if(serverctrls != NULL) *serverctrls = NULL; /* Find the next result... */ - for ( lm = r; lm->lm_chain != NULL; lm = lm->lm_chain ) { + for ( lm = r; lm != NULL; lm = lm->lm_chain ) { /* skip over entries and references */ if( lm->lm_msgtype != LDAP_RES_SEARCH_ENTRY && lm->lm_msgtype != LDAP_RES_SEARCH_REFERENCE &&