ITS#10400 libldap: fix NULL deref in ldap_parse_result()

Broken by patch for ITS#10229.
This commit is contained in:
Howard Chu 2025-10-16 16:49:53 +01:00
parent e8105816ce
commit 44815be4da

View file

@ -261,7 +261,7 @@ ldap_parse_result(
LDAP_MUTEX_LOCK( &ld->ld_res_mutex );
/* Find the result, last msg in chain... */
lm = r->lm_chain_tail;
if ( r->lm_msgid != lm->lm_msgid ) {
if ( lm != NULL && r->lm_msgid != lm->lm_msgid ) {
/*
* ITS#10229: Returned with LDAP_MSG_ALL+LDAP_MSG_RECEIVED. People who
* do that aren't expected to call ldap_parse_result not least because