Skip to content

Commit bfcd01b

Browse files
committed
Fix boundary check error in tdbstore causing kv_set failure with max area size
1 parent 0b6a6d1 commit bfcd01b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

storage/kvstore/tdbstore/source/TDBStore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ int TDBStore::read_record(uint8_t area, uint32_t offset, char *key,
292292
return MBED_ERROR_INVALID_DATA_DETECTED;
293293
}
294294

295-
if (offset + total_size >= _size) {
295+
if (offset + total_size > _size) {
296296
return MBED_ERROR_INVALID_DATA_DETECTED;
297297
}
298298

0 commit comments

Comments
 (0)