diff options
author | Howard Chu <hyc@symas.com> | 2016-01-28 04:15:45 +0000 |
---|---|---|
committer | Howard Chu <hyc@symas.com> | 2016-01-28 04:15:45 +0000 |
commit | 7e65cc0abac60177b3e873808510e87ec5a273d1 (patch) | |
tree | 84d0604cf77bd80338f96d012c49b765cbdf6647 /external/db_drivers/liblmdb/midl.c | |
parent | MDB_VL32 Fix another 32bit overflow (diff) | |
download | monero-7e65cc0abac60177b3e873808510e87ec5a273d1.tar.xz |
MDB_VL32 Fix off-by-one in mdb_midl_shrink
Diffstat (limited to '')
-rw-r--r-- | external/db_drivers/liblmdb/midl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/external/db_drivers/liblmdb/midl.c b/external/db_drivers/liblmdb/midl.c index e2005d16c..152a1ec0d 100644 --- a/external/db_drivers/liblmdb/midl.c +++ b/external/db_drivers/liblmdb/midl.c @@ -120,7 +120,7 @@ void mdb_midl_shrink( MDB_IDL *idp ) { MDB_IDL ids = *idp; 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; *idp = ids; |