cppcheck: avoid out of bound warning

This commit is contained in:
Philippe Teuwen
2026-02-06 16:17:02 +01:00
parent 73df0e186b
commit 8f44b07eb3
+2 -3
View File
@@ -1746,8 +1746,7 @@ typedef struct {
} mfu_otp_identify_t;
static mfu_otp_identify_t mfu_otp_ident_table[] = {
{ "SALTO Systems card", 12, 4, "534C544F", ul_c_otpgenA, "report to iceman!" },
{ NULL, 0, 0, NULL, NULL, NULL }
{ "SALTO Systems card", 12, 4, "534C544F", ul_c_otpgenA, "report to iceman!" }
};
static mfu_otp_identify_t *mfu_match_otp_fingerprint(uint8_t *uid, uint8_t *data) {
@@ -1775,7 +1774,7 @@ static mfu_otp_identify_t *mfu_match_otp_fingerprint(uint8_t *uid, uint8_t *data
PrintAndLogEx(DEBUG, "(fingerprint) found %s", mfu_otp_ident_table[i].desc);
return &mfu_otp_ident_table[i];
}
} while (mfu_otp_ident_table[++i].desc);
} while (++i < ARRAYLEN(mfu_otp_ident_table));
return NULL;
}