Fix for issue #1019, HardFault on certain types of credit/bank cards. (#1211)

The country_code does not always have extra pad bytes, so incrementing the index by 2 in emv_decode_read_sfi_record() was too much.

Co-authored-by: Gary <gary@x1z.net>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
This commit is contained in:
Gary 2022-05-11 06:19:32 -04:00 committed by GitHub
parent 597ee5b939
commit b4125f1f9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -292,7 +292,7 @@ static bool emv_decode_read_sfi_record(uint8_t* buff, uint16_t len, EmvApplicati
i += 2;
} else if(emv_decode_search_tag_u16_r(EMV_TAG_COUNTRY_CODE, buff, &i)) {
app->country_code = (buff[i] << 8) | buff[i + 1];
i += 2;
i += 1;
}
}