X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/c3e8413c2b4b8990fb28b3868069cbd9bbac3913..a28d34f407dc172f1e5b0dc257e8fc89e67706f0:/armsrc/iso14443b.c diff --git a/armsrc/iso14443b.c b/armsrc/iso14443b.c index b8f83b97..e89c3bec 100644 --- a/armsrc/iso14443b.c +++ b/armsrc/iso14443b.c @@ -556,7 +556,7 @@ void SimulateIso14443bTag(uint32_t pupi) { // ...PUPI/UID supplied from user. Adjust ATQB response accordingly if ( pupi > 0 ) { - uint8_t len = size(respATQB); + uint8_t len = sizeof(respATQB); num_to_bytes(pupi, 4, respATQB+1); ComputeCrc14443(CRC_14443_B, respATQB, 12, &respATQB[len-2], &respATQB[len-1]); } @@ -1269,12 +1269,13 @@ uint8_t iso14443b_select_card(iso14b_card_select_t *card ) return 3; // CID - if (card) card->cid = Demod.output[0]; - - uint8_t fwt = card->atqb[6]>>4; - if ( fwt < 16 ){ - uint32_t fwt_time = (302 << fwt); - iso14b_set_timeout( fwt_time); + if (card) { + card->cid = Demod.output[0]; + uint8_t fwt = card->atqb[6] >> 4; + if ( fwt < 16 ){ + uint32_t fwt_time = (302 << fwt); + iso14b_set_timeout( fwt_time); + } } // reset PCB block number pcb_blocknum = 0;