Skip to content

Commit

Permalink
Handle empty free-space entry as an error
Browse files Browse the repository at this point in the history
  • Loading branch information
kriszyp committed Nov 14, 2024
1 parent c69b1c4 commit f43e075
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions dependencies/lmdb/libraries/liblmdb/mdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2956,8 +2956,13 @@ mdb_page_alloc(MDB_cursor *mc, int num, MDB_page **mp)
break;
}
goto fail;
} else
mdb_cassert(&m2, key.mv_size > 0);
} else {
if (key.mv_size == 0) {
fprintf(stderr, "Invalid zero size key\n");
rc = MDB_BAD_VALSIZE;
goto fail;
}
}
last = *(txnid_t *) key.mv_data;
}
if (rc == MDB_NOTFOUND) break;
Expand Down

0 comments on commit f43e075

Please sign in to comment.