From: Quanah Gibson-Mount Date: Mon, 17 Jun 2019 17:15:00 +0000 (+0000) Subject: ITS#8997 - Fix segfault by setting return code value X-Git-Tag: OPENLDAP_REL_ENG_2_5_0ALPHA~67^2~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85ccf7bbac9c0c1e90a5802fd234a1e0f311a07c;p=thirdparty%2Fopenldap.git ITS#8997 - Fix segfault by setting return code value 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. --- diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index d8edb879fc..fadf537b4a 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -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; }