mirror of
https://github.com/monero-project/monero.git
synced 2024-12-13 20:06:32 +02:00
MDB_VL32 Fix off-by-one in mdb_midl_shrink
This commit is contained in:
parent
222e30ec97
commit
7e65cc0aba
2
external/db_drivers/liblmdb/midl.c
vendored
2
external/db_drivers/liblmdb/midl.c
vendored
@ -120,7 +120,7 @@ void mdb_midl_shrink( MDB_IDL *idp )
|
|||||||
{
|
{
|
||||||
MDB_IDL ids = *idp;
|
MDB_IDL ids = *idp;
|
||||||
if (*(--ids) > MDB_IDL_UM_MAX &&
|
if (*(--ids) > MDB_IDL_UM_MAX &&
|
||||||
(ids = realloc(ids, (MDB_IDL_UM_MAX+1) * sizeof(MDB_ID))))
|
(ids = realloc(ids, (MDB_IDL_UM_MAX+2) * sizeof(MDB_ID))))
|
||||||
{
|
{
|
||||||
*ids++ = MDB_IDL_UM_MAX;
|
*ids++ = MDB_IDL_UM_MAX;
|
||||||
*idp = ids;
|
*idp = ids;
|
||||||
|
Loading…
Reference in New Issue
Block a user