guard for last element

This commit is contained in:
iceman1001
2026-03-29 09:40:23 +07:00
parent 5d89180815
commit ae315d1471
+5 -1
View File
@@ -1751,12 +1751,16 @@ 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!" }
{ "SALTO Systems card", 12, 4, "534C544F", ul_c_otpgenA, "report to iceman!" },
{ NULL, 0, 0, NULL , NULL, NULL} // must be the last item
};
static mfu_otp_identify_t *mfu_match_otp_fingerprint(uint8_t *uid, uint8_t *data) {
uint8_t i = 0;
do {
if ( mfu_otp_ident_table[i].desc == NULL) {
break;
}
int ml = 0;
uint8_t mtmp[40] = {0};