mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-30 11:29:19 +08:00
mdbx: treat pagesize == 0/INTPTR_MAX as aliases for MIN_PAGESIZE/MAX_PAGESIZE.
This commit is contained in:
parent
3535e7a6d6
commit
ee899a21ed
@ -5723,6 +5723,11 @@ LIBMDBX_API int mdbx_env_set_geometry(MDBX_env *env, intptr_t size_lower,
|
||||
}
|
||||
}
|
||||
|
||||
if (pagesize == 0)
|
||||
pagesize = MIN_PAGESIZE;
|
||||
else if (pagesize == INTPTR_MAX)
|
||||
pagesize = MAX_PAGESIZE;
|
||||
|
||||
if (pagesize < (intptr_t)MIN_PAGESIZE || pagesize > (intptr_t)MAX_PAGESIZE ||
|
||||
!mdbx_is_power2(pagesize)) {
|
||||
rc = MDBX_EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user