From: Hallvard Furuseth Date: Wed, 3 Oct 2012 16:08:56 +0000 (+0200) Subject: Fix mdb_open() off-by-one error in maxdbs check X-Git-Tag: OPENLDAP_REL_ENG_2_4_34~139^2~21 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a3f33dd20e71b9c94e94a0e1125fcee8d35fc70f;p=openldap Fix mdb_open() off-by-one error in maxdbs check --- diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index 9e3e2ae9d7..262919a24c 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -6548,7 +6548,7 @@ int mdb_open(MDB_txn *txn, const char *name, unsigned int flags, MDB_dbi *dbi) } /* If no free slot and max hit, fail */ - if (!unused && txn->mt_numdbs >= txn->mt_env->me_maxdbs - 1) + if (!unused && txn->mt_numdbs >= txn->mt_env->me_maxdbs) return MDB_DBS_FULL; /* Find the DB info */