]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9557 back-mdb: fix mdb_waitfixup for candidate-based searches
authorHoward Chu <hyc@openldap.org>
Thu, 27 May 2021 11:48:36 +0000 (12:48 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 1 Jun 2021 17:56:47 +0000 (17:56 +0000)
Off-by-one left last scope unrefreshed

servers/slapd/back-mdb/search.c

index 1bc4ec0a51261251ca5d195d2b3561d3edfe1041..372a7ab6253e14e3e2d8cd17ac956f766e128284 100644 (file)
@@ -406,7 +406,7 @@ mdb_waitfixup( Operation *op, ww_ctx *ww, MDB_cursor *mci, MDB_cursor *mcd, IdSc
                ww->data.mv_data = NULL;
        } else if ( isc->scopes[0].mid > 1 ) {  /* candidate-based search */
                int i;
-               for ( i=1; i<isc->scopes[0].mid; i++ ) {
+               for ( i=1; i<=isc->scopes[0].mid; i++ ) {
                        if ( !isc->scopes[i].mval.mv_data )
                                continue;
                        key.mv_data = &isc->scopes[i].mid;