mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-01 23:54:12 +08:00
mdbx: backport - ITS#8363 Fix off-by-one in mdb_midl_shrink().
Change-Id: I92a2ed30703f6cd5e91c7f380f1954da4cbe896b
This commit is contained in:
parent
a2db88baf6
commit
0e508f0d3b
1
CHANGES
1
CHANGES
@ -7,6 +7,7 @@ LMDB 0.9.18 Release Engineering
|
|||||||
Fix MDB_APPENDDUP vs. rewrite(single item) (ITS#8334)
|
Fix MDB_APPENDDUP vs. rewrite(single item) (ITS#8334)
|
||||||
n/a for mdbx - Fix mdb_copy of large files on Windows
|
n/a for mdbx - Fix mdb_copy of large files on Windows
|
||||||
Fix subcursor move after delete (ITS#8355)
|
Fix subcursor move after delete (ITS#8355)
|
||||||
|
Fix mdb_midl_shrink off-by-one (ITS#8363)
|
||||||
n/a for mdbx - Check for utf8_to_utf16 failures (ITS#7992)
|
n/a for mdbx - Check for utf8_to_utf16 failures (ITS#7992)
|
||||||
Catch strdup failure in mdb_dbi_open
|
Catch strdup failure in mdb_dbi_open
|
||||||
Build
|
Build
|
||||||
|
2
midl.c
2
midl.c
@ -120,7 +120,7 @@ static 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…
x
Reference in New Issue
Block a user