]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#8997 - Fix segfault by setting return code value
authorQuanah Gibson-Mount <quanah@openldap.org>
Mon, 17 Jun 2019 17:15:00 +0000 (17:15 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 17 Jun 2019 17:15:00 +0000 (17:15 +0000)
Fix case with back-ldap where an entry was returned but didn't match the filter being applied by setting the return code value before dropping to cleanup.

servers/slapd/back-ldap/search.c

index d8edb879fc41f2f1d55e6aea993e6a9ddc64153f..fadf537b4af83ed66b650c0e0825f3fed9939d33 100644 (file)
@@ -1006,6 +1006,7 @@ retry:
        e = ldap_first_entry( lc->lc_ld, result );
        if ( e == NULL ) {
                /* the entry exists, but it doesn't match the filter? */
+               rc = LDAP_NO_RESULTS_RETURNED;
                goto cleanup;
        }