From: Howard Chu Date: Thu, 16 Oct 2025 15:49:53 +0000 (+0100) Subject: ITS#10400 libldap: fix NULL deref in ldap_parse_result() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=44815be4dab1fc058c5fad6df20b8f2283a9ebc1;p=thirdparty%2Fopenldap.git ITS#10400 libldap: fix NULL deref in ldap_parse_result() Broken by patch for ITS#10229. --- diff --git a/libraries/libldap/error.c b/libraries/libldap/error.c index bb38688721..9ca2af9c5b 100644 --- a/libraries/libldap/error.c +++ b/libraries/libldap/error.c @@ -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