From 44815be4dab1fc058c5fad6df20b8f2283a9ebc1 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 16 Oct 2025 16:49:53 +0100 Subject: [PATCH] ITS#10400 libldap: fix NULL deref in ldap_parse_result() Broken by patch for ITS#10229. --- libraries/libldap/error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.3