]> git.sur5r.net Git - openldap/commitdiff
ITS#8190 fix cursor EOF bug
authorHoward Chu <hyc@openldap.org>
Tue, 7 Jul 2015 12:41:32 +0000 (13:41 +0100)
committerHoward Chu <hyc@openldap.org>
Tue, 7 Jul 2015 12:42:41 +0000 (13:42 +0100)
libraries/liblmdb/mdb.c

index 61141e9b4a9054552550538253fbad3cbc98601f..b576c82c340825c97a93686dbf74d6018d16d989 100644 (file)
@@ -5924,8 +5924,10 @@ set2:
 
        if (leaf == NULL) {
                DPUTS("===> inexact leaf not found, goto sibling");
-               if ((rc = mdb_cursor_sibling(mc, 1)) != MDB_SUCCESS)
+               if ((rc = mdb_cursor_sibling(mc, 1)) != MDB_SUCCESS) {
+                       mc->mc_flags |= C_EOF;
                        return rc;              /* no entries matched */
+               }
                mp = mc->mc_pg[mc->mc_top];
                mdb_cassert(mc, IS_LEAF(mp));
                leaf = NODEPTR(mp, 0);