diff --git a/mdb_chk.c b/mdb_chk.c index 23e7da2f..1422eea1 100644 --- a/mdb_chk.c +++ b/mdb_chk.c @@ -264,7 +264,7 @@ static int pgvisitor(size_t pgno, unsigned pgnumber, void* ctx, const char* dbi, problem_add("page", pgno, "illegal header-length", "%zu < %i < %zu", sizeof(long), header_bytes, stat.base.ms_psize - sizeof(long)); if (payload_bytes < 1) { - if (nentries > 0) { + if (nentries > 1) { problem_add("page", pgno, "zero size-of-entry", "payload %i bytes, %i entries", payload_bytes, nentries); if ((size_t) header_bytes + unused_bytes < page_size) { diff --git a/mdbx.c b/mdbx.c index 4d249174..e3c86693 100644 --- a/mdbx.c +++ b/mdbx.c @@ -279,8 +279,6 @@ mdb_env_walk(mdb_walk_ctx_t *ctx, const char* dbi, pgno_t pg, int flags, int dee MDB_db *db = NODEDATA(node); char* name = NULL; - if (NODEDSZ(node) < 1) - return MDB_CORRUPTED; if (! (node->mn_flags & F_DUPDATA)) { name = NODEKEY(node); int namelen = (char*) db - name;