]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10400 libldap: fix NULL deref in ldap_parse_result()
authorHoward Chu <hyc@openldap.org>
Thu, 16 Oct 2025 15:49:53 +0000 (16:49 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 4 Nov 2025 15:47:57 +0000 (15:47 +0000)
Broken by patch for ITS#10229.

libraries/libldap/error.c

index bb3868872109022ccafa5d8de8f0069af4246471..9ca2af9c5b65e3bedddfee7223d93471e4dc88e4 100644 (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