mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-30 11:29:19 +08:00
mdbx: assert_fail() when INDXSIZE(key) > nodemax
.
Change-Id: I2fadc68a3e682dd3d8b3b8b5f48ed096e9a92288
This commit is contained in:
parent
ddb3c32258
commit
5b160be128
5
mdb.c
5
mdb.c
@ -7232,10 +7232,11 @@ mdb_branch_size(MDB_env *env, MDB_val *key)
|
|||||||
size_t sz;
|
size_t sz;
|
||||||
|
|
||||||
sz = INDXSIZE(key);
|
sz = INDXSIZE(key);
|
||||||
if (sz > env->me_nodemax) {
|
if (unlikely(sz > env->me_nodemax)) {
|
||||||
/* put on overflow page */
|
/* put on overflow page */
|
||||||
/* not implemented */
|
/* not implemented */
|
||||||
/* sz -= key->size - sizeof(pgno_t); */
|
mdb_assert_fail(env, "INDXSIZE(key) <= env->me_nodemax", __FUNCTION__, __LINE__);
|
||||||
|
sz -= key->mv_size - sizeof(pgno_t);
|
||||||
}
|
}
|
||||||
|
|
||||||
return sz + sizeof(indx_t);
|
return sz + sizeof(indx_t);
|
||||||
|
Loading…
Reference in New Issue
Block a user