Skip to content

Commit 06dd330

Browse files
author
Kyle Kearney
committed
Fix missing offset in TBStore read from flash
This could cause incomplete data retrieval and mismatch when reading data in more than one chunk, because every chunk would be read to the same location at the beginning of the output buffer.
1 parent 7455b89 commit 06dd330

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
@@ -1418,7 +1418,7 @@ int TDBStore::do_reserved_data_get(void *reserved_data, size_t reserved_data_buf
14181418

14191419
while (actual_size) {
14201420
uint32_t chunk = std::min(work_buf_size, (uint32_t) actual_size);
1421-
ret = read_area(_active_area, offset, chunk, buf);
1421+
ret = read_area(_active_area, offset, chunk, buf + offset);
14221422
if (ret) {
14231423
return ret;
14241424
}

0 commit comments

Comments
 (0)