mdbx: add MDBX_PNL_MAX and checking size of lists.

Change-Id: I32e31d2caf676e1e96cc4f82610544b5c5ee3a6d
This commit is contained in:
Leonid Yuriev
2018-08-10 11:28:05 +03:00
parent b4fd29a67b
commit c472300b13
3 changed files with 77 additions and 53 deletions

View File

@@ -340,7 +340,7 @@ static int handle_freedb(const uint64_t record_number, const MDBX_val *key,
data->iov_len);
else {
const pgno_t number = *iptr++;
if (number >= MDBX_PNL_UM_MAX)
if (number < 1 || number > MDBX_PNL_MAX)
problem_add("entry", record_number, "wrong idl length", "%" PRIiPTR "",
number);
else if ((number + 1) * sizeof(pgno_t) != data->iov_len)