From: Howard Chu Date: Mon, 19 Sep 2011 01:26:54 +0000 (-0700) Subject: Additional fix for prev commit X-Git-Tag: OPENLDAP_REL_ENG_2_4_27~148^2~21 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=02abfb91ba3b2e62552fdb31d7fc3a1cde63b17f;p=openldap Additional fix for prev commit --- diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index 117a891339..e91233f6a4 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -3695,8 +3695,9 @@ top: offset = NODESIZE + sizeof(indx_t) + data->mv_size; } offset += offset & 1; - if (NODESIZE + NODEKSZ(leaf) + NODEDSZ(leaf) + offset >= - (mc->mc_txn->mt_env->me_psize - PAGEHDRSZ) / MDB_MINKEYS) { + if (NODESIZE + sizeof(indx_t) + NODEKSZ(leaf) + NODEDSZ(leaf) + + offset >= (mc->mc_txn->mt_env->me_psize - PAGEHDRSZ) / + MDB_MINKEYS) { /* yes, convert it */ dummy.md_flags = 0; if (mc->mc_db->md_flags & MDB_DUPFIXED) {