From 72d978ee485b8a10f49b3f94af8565ba4e890a51 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Thu, 11 Feb 2021 13:07:41 +0300 Subject: [PATCH] mdbx: weakens checks during set the `MDBX_opt_txn_dp_limit` to avoid `MDBX_EINVAL`. Change-Id: I4852261d0c45b726c60792463ab698538fa447e5 --- src/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core.c b/src/core.c index fdeb733e..046c2fd0 100644 --- a/src/core.c +++ b/src/core.c @@ -20902,8 +20902,7 @@ __cold int mdbx_env_set_option(MDBX_env *env, const MDBX_option_t option, case MDBX_opt_txn_dp_limit: case MDBX_opt_txn_dp_initial: - if (unlikely(value > MDBX_PGL_LIMIT || value < CURSOR_STACK * 4 || - value > bytes2pgno(env, env->me_dbgeo.upper) - NUM_METAS)) + if (unlikely(value > MDBX_PGL_LIMIT || value < CURSOR_STACK * 4)) return MDBX_EINVAL; if (unlikely(env->me_txn0 == NULL)) return MDBX_EACCESS;