fix(frftl): array out of bounds issue (#6427)
This commit is contained in:
@@ -1150,8 +1150,8 @@ bool ftlInit(FrFTL* ftl, const FrFTLOps* cb, uint16_t flashSizeInMB)
|
|||||||
{
|
{
|
||||||
// Check flash size
|
// Check flash size
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for (uint8_t i = 0; i < sizeof(supportedFlashSizes); i++) {
|
for (const auto& size : supportedFlashSizes) {
|
||||||
if (flashSizeInMB == supportedFlashSizes[i]) {
|
if (flashSizeInMB == size) {
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user