From: Howard Chu Date: Mon, 3 Oct 2011 02:52:12 +0000 (-0700) Subject: Fix 6e05ca17e988754ae90fde1921765ba130bb90b2 X-Git-Tag: OPENLDAP_REL_ENG_2_4_27~148^2~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=163514e4706cfcf827afde82c7d2811032c1c19b;p=openldap Fix 6e05ca17e988754ae90fde1921765ba130bb90b2 Missed a MDB_RESERVE case --- diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index b3f4f0de9f..0ac61a3d53 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -4062,7 +4062,10 @@ current: /* same size, just replace it */ if (!F_ISSET(leaf->mn_flags, F_BIGDATA) && NODEDSZ(leaf) == data->mv_size) { - memcpy(NODEDATA(leaf), data->mv_data, data->mv_size); + if (F_ISSET(flags, MDB_RESERVE)) + data->mv_data = NODEDATA(leaf); + else + memcpy(NODEDATA(leaf), data->mv_data, data->mv_size); goto done; } mdb_node_del(mc->mc_pg[mc->mc_top], mc->mc_ki[mc->mc_top], 0);