Skip to content

Commit 4b5f34a

Browse files
authored
Merge pull request #12844 from amq/patch-3
Add invalid data case to tdbstore ram init
2 parents e2c01fa + 56d35b1 commit 4b5f34a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

features/storage/kvstore/tdbstore/TDBStore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ int TDBStore::build_ram_table()
937937
_num_keys = 0;
938938
offset = _master_record_offset;
939939

940-
while (offset < _free_space_offset) {
940+
while (offset + sizeof(record_header_t) < _free_space_offset) {
941941
ret = read_record(_active_area, offset, _key_buf, 0, 0, actual_data_size, 0,
942942
true, false, false, true, hash, flags, next_offset);
943943

0 commit comments

Comments
 (0)