From d12c97e2755f2349cca48079dc12718c6dd2c1cb Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 6 Oct 2025 16:49:25 +0100 Subject: [PATCH] ITS#10396 lmdb: fix mdb_cursor_del0 with multiple DUPSORT cursors Use the correct stack index when adjusting other cursors pointing to the affected page and the DB has a subDB. Broken in ITS#8406. --- libraries/liblmdb/mdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index b8746bc6c4..887ad3ecfe 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -10325,7 +10325,7 @@ mdb_cursor_del0(MDB_cursor *mc) goto fail; } if (m3->mc_xcursor && !(m3->mc_flags & C_EOF)) { - MDB_node *node = NODEPTR(m3->mc_pg[m3->mc_top], m3->mc_ki[m3->mc_top]); + MDB_node *node = NODEPTR(m3->mc_pg[mc->mc_top], m3->mc_ki[mc->mc_top]); /* If this node has dupdata, it may need to be reinited * because its data has moved. * If the xcursor was not initd it must be reinited. -- 2.47.3