fix(frftl): array out of bounds issue (#6427)

This commit is contained in:
fpenard
2025-07-10 07:55:22 +10:00
committed by GitHub
parent d7fd9fbec2
commit 8dd2c5bbf7
+2 -2
View File
@@ -1150,8 +1150,8 @@ bool ftlInit(FrFTL* ftl, const FrFTLOps* cb, uint16_t flashSizeInMB)
{
// Check flash size
bool found = false;
for (uint8_t i = 0; i < sizeof(supportedFlashSizes); i++) {
if (flashSizeInMB == supportedFlashSizes[i]) {
for (const auto& size : supportedFlashSizes) {
if (flashSizeInMB == size) {
found = true;
break;
}