mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-06-08 07:03:35 +02:00
Fix LE computation in a wrapped APDU.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -213,7 +213,7 @@ uint16_t sm_get_le() {
|
|||||||
if (tag == 0x97) {
|
if (tag == 0x97) {
|
||||||
uint16_t le = 0;
|
uint16_t le = 0;
|
||||||
for (uint16_t t = 1; t <= tag_len; t++) {
|
for (uint16_t t = 1; t <= tag_len; t++) {
|
||||||
le |= (*tag_data++) << (tag_len - t);
|
le |= (*tag_data++) << (tag_len - t) * 8;
|
||||||
}
|
}
|
||||||
return le;
|
return le;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user