From: Howard Chu Date: Sat, 26 Jan 2013 18:55:35 +0000 (+0000) Subject: Fix MDB_CURRENT updating for dupsort items X-Git-Tag: OPENLDAP_REL_ENG_2_4_34~55^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cfedb365b4a2a90111810a7918d58aa679adb99c;p=openldap Fix MDB_CURRENT updating for dupsort items --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index e5013d6d56..575e494487 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -5064,8 +5064,10 @@ current: */ if (F_ISSET(flags, MDB_RESERVE)) data->mv_data = NODEDATA(leaf); - else + else if (data->mv_size) memcpy(NODEDATA(leaf), data->mv_data, data->mv_size); + else + memcpy(NODEKEY(leaf), key->mv_data, key->mv_size); goto done; } mdb_node_del(mc->mc_pg[mc->mc_top], mc->mc_ki[mc->mc_top], 0);