From: Salvador Ortiz Date: Fri, 9 Aug 2013 15:08:53 +0000 (-0500) Subject: mdb_del must ignore data if db not opened with MDB_DUPSORT X-Git-Tag: OPENLDAP_REL_ENG_2_4_36~11^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=335f0e4ceeed82a1302bf16cf2c3df00f45798c4;p=openldap mdb_del must ignore data if db not opened with MDB_DUPSORT --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index ca7233466b..abc4a82dee 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -7192,6 +7192,10 @@ mdb_del(MDB_txn *txn, MDB_dbi dbi, mdb_cursor_init(&mc, txn, dbi, &mx); exact = 0; + if (!F_ISSET(txn->mt_dbs[dbi].md_flags, MDB_DUPSORT)) { + /* must ignore any data */ + data = NULL; + } if (data) { op = MDB_GET_BOTH; rdata = *data;