mdbx: fix/check lower border for dirty-pages list's limits/options.

More for https://github.com/erthink/libmdbx/issues/128.

Change-Id: Ie9dccee5cf90d26968db04f4f6d9afa3018fcf0e
This commit is contained in:
Leonid Yuriev 2020-12-04 13:39:09 +03:00
parent 0b02e080c4
commit 87c765c7be

View File

@ -19766,7 +19766,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))
if (unlikely(value > MDBX_PGL_LIMIT || value < CURSOR_STACK * 4))
return MDBX_EINVAL;
if (unlikely(env->me_txn0 == NULL))
return MDBX_EACCESS;