]> git.sur5r.net Git - openldap/commitdiff
Additional fix for prev commit
authorHoward Chu <hyc@symas.com>
Mon, 19 Sep 2011 01:26:54 +0000 (18:26 -0700)
committerHoward Chu <hyc@symas.com>
Mon, 19 Sep 2011 01:26:54 +0000 (18:26 -0700)
libraries/libmdb/mdb.c

index 117a8913399c26258ba270c6fecbf8263c858831..e91233f6a40703fcf98deb7285d52695b48f43a6 100644 (file)
@@ -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) {