Skip to content

Commit 5ce902c

Browse files
committed
Parse IBAN (field 5F53) as format 'an'
EMV 4.4 Book 3 Annex A states that this field has format 'var' and a length of up to 34 bytes while Wikipedia states that an IBAN consists of 34 alphanumeric characters. Therefore this implementation assumes that this field can be interpreted as format 'an'.
1 parent 0e1ab29 commit 5ce902c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/emv_strings.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,12 @@ int emv_tlv_get_info(
452452
"Uniquely identifies the account of a customer at a financial "
453453
"institution as defined in ISO 13616.";
454454
info->format = EMV_FORMAT_VAR;
455-
return emv_tlv_value_get_string(tlv, EMV_FORMAT_CN, 34, value_str, value_str_len);
455+
// EMV 4.4 Book 3 Annex A states that this field has format 'var'
456+
// and a length of up to 34 bytes while Wikipedia states that an
457+
// IBAN consists of 34 alphanumeric characters. Therefore this
458+
// implementation assumes that this field can be interpreted as
459+
// format 'an'.
460+
return emv_tlv_value_get_string(tlv, EMV_FORMAT_AN, 34, value_str, value_str_len);
456461

457462
case EMV_TAG_5F54_BANK_IDENTIFIER_CODE:
458463
info->tag_name = "Bank Identifier Code (BIC)";

0 commit comments

Comments
 (0)