diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index 9480a43..cd0e810 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -1737,8 +1737,10 @@ mdb_txn_commit(MDB_txn *txn) } x = dst[0].mid; for (; y<=src[0].mid; y++) { - if (++x >= MDB_IDL_UM_MAX) + if (++x >= MDB_IDL_UM_MAX) { + mdb_txn_abort(txn); return ENOMEM; + } dst[x] = src[y]; } dst[0].mid = x; diff --git a/libraries/libmdb/mdb.h b/libraries/libmdb/mdb.h index c40a5e9..5682c8f 100644 --- a/libraries/libmdb/mdb.h +++ b/libraries/libmdb/mdb.h @@ -530,6 +530,7 @@ int mdb_txn_begin(MDB_env *env, MDB_txn *parent, unsigned int flags, MDB_txn ** *
  • EINVAL - an invalid parameter was specified. *
  • ENOSPC - no more disk space. *
  • EIO - a low-level I/O error occurred while writing. + *
  • ENOMEM - the transaction is nested and could not be merged into its parent. * */ int mdb_txn_commit(MDB_txn *txn);