From 4a1717708cf1127c3d5d9f4101af69d67d8296d7 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 6 Nov 2013 16:49:25 -0800 Subject: [PATCH] Fix cursor_del0 cursor fixup Skip cursors that aren't as deep as current cursor --- libraries/liblmdb/mdb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 8aee859..44ce73e 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -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;