]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/iso14443b.c
FIX: Coverity scan 1333852, Make sure (card) is not null before accessing it.
[proxmark3-svn] / armsrc / iso14443b.c
index b8f83b9743b1c1b6e67abedd4fbcd7c246c68677..cccf0dd6744c4ffc772ee6c73cb15d99b620c0f7 100644 (file)
@@ -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;
Impressum, Datenschutz