]> git.sur5r.net Git - openldap/commitdiff
Fix cursor_del0 cursor fixup
authorHoward Chu <hyc@symas.com>
Thu, 7 Nov 2013 00:49:25 +0000 (16:49 -0800)
committerHoward Chu <hyc@symas.com>
Thu, 7 Nov 2013 00:51:21 +0000 (16:51 -0800)
Skip cursors that aren't as deep as current cursor

libraries/liblmdb/mdb.c

index 8aee8597866594546d0892dcd87bb3a548ed8819..44ce73e8b502f7021c89d2134e63037265156e64 100644 (file)
@@ -7295,6 +7295,8 @@ mdb_cursor_del0(MDB_cursor *mc, MDB_node *leaf)
                                continue;
                        if (!(m2->mc_flags & C_INITIALIZED))
                                continue;
+                       if (m2->mc_top < mc->mc_top)
+                               continue;
                        if (m2->mc_pg[mc->mc_top] == mp) {
                                if (m2->mc_ki[mc->mc_top] >= ki) {
                                        m2->mc_flags |= C_DEL;