diff --git a/client/src/cmdsmartcard.c b/client/src/cmdsmartcard.c index 6af48d90c..8d3586732 100644 --- a/client/src/cmdsmartcard.c +++ b/client/src/cmdsmartcard.c @@ -1312,6 +1312,8 @@ static int CmdPCSC(const char *Cmd) { } } + // ISO 7816-3 specifies that ATRs can be 2 to 33 bytes long + // but some custom cards may support up to 256 bytes long ATRs uint8_t res[2 + 256] = {0}; res[1] = atrLen; memcpy(res + 2, atr, atrLen);