From: Howard Chu Date: Wed, 26 Jul 2017 19:52:31 +0000 (+0100) Subject: Fix 418ea8b94e SEGV on spilled ovpg X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81984ab22865d9dcd862e8de25a79f81530dc300;p=thirdparty%2Fopenldap.git Fix 418ea8b94e SEGV on spilled ovpg Don't spill an ovpg that is referenced in a cursor --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 4dd4f6e7a2..95d24803a4 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -2298,6 +2298,9 @@ mdb_pages_xkeep(MDB_cursor *mc, unsigned pflags, int all) if (IS_DIRTY_NW(txn, mp)) mp->mp_flags ^= P_KEEP; } + if (MC_OVPG(m3) && ((MC_OVPG(m3)->mp_flags & Mask) == pflags) && + IS_DIRTY_NW(txn, MC_OVPG(m3))) + MC_OVPG(m3)->mp_flags ^= P_KEEP; mx = m3->mc_xcursor; /* Proceed to mx if it is at a sub-database */ if (! (mx && (mx->mx_cursor.mc_flags & C_INITIALIZED)))