Fixed UTF-8 passwords for DeviceCommunicationControl to hold up to 20 UTF-8 characters (#767)
This commit is contained in:
committed by
GitHub
parent
b9adcc8097
commit
f4325f00b5
+2
-1
@@ -51,7 +51,8 @@ int reinitialize_device_encode(
|
||||
}
|
||||
/* password [1] CharacterString (SIZE (1..20)) OPTIONAL */
|
||||
if (password) {
|
||||
if ((password->length >= 1) && (password->length <= 20)) {
|
||||
if ((password->length >= 1) &&
|
||||
(characterstring_utf8_length(password) <= 20)) {
|
||||
len = encode_context_character_string(apdu, 1, password);
|
||||
apdu_len += len;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user