mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
Jumps len check fix
This commit is contained in:
parent
c5582ab7c7
commit
ac84e855a9
1 changed files with 3 additions and 2 deletions
|
@ -714,11 +714,12 @@ bool GetATR(smart_card_atr_t *card_ptr, bool verbose) {
|
||||||
|
|
||||||
// read bytes from module
|
// read bytes from module
|
||||||
uint16_t len = sizeof(card_ptr->atr);
|
uint16_t len = sizeof(card_ptr->atr);
|
||||||
|
if (sc_rx_bytes(card_ptr->atr, &len) == false)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (len > sizeof(card_ptr->atr)) {
|
if (len > sizeof(card_ptr->atr)) {
|
||||||
len = sizeof(card_ptr->atr);
|
len = sizeof(card_ptr->atr);
|
||||||
}
|
}
|
||||||
if (sc_rx_bytes(card_ptr->atr, &len) == false)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
uint8_t pos_td = 1;
|
uint8_t pos_td = 1;
|
||||||
if ((card_ptr->atr[1] & 0x10) == 0x10) pos_td++;
|
if ((card_ptr->atr[1] & 0x10) == 0x10) pos_td++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue