atr length fix

This commit is contained in:
merlokk 2019-02-20 18:44:17 +02:00
commit 8987cc85b1

View file

@ -805,6 +805,11 @@ static int CmdSmartInfo(const char *Cmd){
return 1; return 1;
} }
if (!card.atr_len) {
if (!silent) PrintAndLogEx(ERR, "can't get ATR from a smart card");
return 1;
}
// print header // print header
PrintAndLogEx(INFO, "--- Smartcard Information ---------"); PrintAndLogEx(INFO, "--- Smartcard Information ---------");
PrintAndLogEx(INFO, "-------------------------------------------------------------"); PrintAndLogEx(INFO, "-------------------------------------------------------------");