mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:24:13 +08:00
mdbx: weakens checks during set the MDBX_opt_txn_dp_limit
to avoid MDBX_EINVAL
.
Change-Id: I4852261d0c45b726c60792463ab698538fa447e5
This commit is contained in:
parent
7fcf11013e
commit
72d978ee48
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user