From 8987cc85b17d8952a4a31ba9619322f2cbe21bba Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Wed, 20 Feb 2019 18:44:17 +0200 Subject: [PATCH] atr length fix --- client/cmdsmartcard.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/cmdsmartcard.c b/client/cmdsmartcard.c index ff85ce02..b0d96f13 100644 --- a/client/cmdsmartcard.c +++ b/client/cmdsmartcard.c @@ -804,6 +804,11 @@ static int CmdSmartInfo(const char *Cmd){ if (!silent) PrintAndLogEx(WARNING, "smart card select failed"); return 1; } + + if (!card.atr_len) { + if (!silent) PrintAndLogEx(ERR, "can't get ATR from a smart card"); + return 1; + } // print header PrintAndLogEx(INFO, "--- Smartcard Information ---------");