]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Fix 418ea8b94e SEGV on spilled ovpg
authorHoward Chu <hyc@openldap.org>
Wed, 26 Jul 2017 19:52:31 +0000 (20:52 +0100)
committerHoward Chu <hyc@openldap.org>
Sat, 10 Oct 2020 12:00:01 +0000 (13:00 +0100)
Don't spill an ovpg that is referenced in a cursor

libraries/liblmdb/mdb.c

index 4dd4f6e7a207ed497c292eab7d7def0a4b58ada7..95d24803a4474d533e61e29364353c375e045ff3 100644 (file)
@@ -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)))