From: iceman1001 Date: Tue, 2 Aug 2016 22:39:02 +0000 (+0200) Subject: FIX: Coverity scan 1333852, Make sure (card) is not null before accessing it. X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/65cdf0e3f9598e17c7cd0570ca616f51eec11725?hp=c3e8413c2b4b8990fb28b3868069cbd9bbac3913 FIX: Coverity scan 1333852, Make sure (card) is not null before accessing it. --- diff --git a/armsrc/iso14443b.c b/armsrc/iso14443b.c index b8f83b97..cccf0dd6 100644 --- a/armsrc/iso14443b.c +++ b/armsrc/iso14443b.c @@ -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;