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.
pull/11296/head
Kyle Kearney 2019-08-20 17:12:18 -07:00
parent 7455b89603
commit 06dd330320
1 changed files with 1 additions and 1 deletions

View File

@ -1418,7 +1418,7 @@ int TDBStore::do_reserved_data_get(void *reserved_data, size_t reserved_data_buf
while (actual_size) {
uint32_t chunk = std::min(work_buf_size, (uint32_t) actual_size);
ret = read_area(_active_area, offset, chunk, buf);
ret = read_area(_active_area, offset, chunk, buf + offset);
if (ret) {
return ret;
}