From 8f44b07eb3c34a8c12937ce1ea4b8f47469e77ee Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 6 Feb 2026 16:17:02 +0100 Subject: [PATCH] cppcheck: avoid out of bound warning --- client/src/cmdhfmfu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/src/cmdhfmfu.c b/client/src/cmdhfmfu.c index 80d7de42a..c9a301490 100644 --- a/client/src/cmdhfmfu.c +++ b/client/src/cmdhfmfu.c @@ -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; }