Fix LE computation in a wrapped APDU.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2024-01-02 19:57:46 +01:00
parent 8476316e21
commit 5ea372f01c
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -213,7 +213,7 @@ uint16_t sm_get_le() {
if (tag == 0x97) {
uint16_t le = 0;
for (uint16_t t = 1; t <= tag_len; t++) {
le |= (*tag_data++) << (tag_len - t);
le |= (*tag_data++) << (tag_len - t) * 8;
}
return le;
}