mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-05-12 11:18:11 -07:00
fix(pcsc): remove infinite loop and buffer overflow in smart pcsc
This commit is contained in:
@@ -1312,7 +1312,7 @@ static int CmdPCSC(const char *Cmd) {
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t res[22] = {0};
|
||||
uint8_t res[2 + 256] = {0};
|
||||
res[1] = atrLen;
|
||||
memcpy(res + 2, atr, atrLen);
|
||||
mbedtls_net_send(&netCtx, res, 2 + atrLen);
|
||||
@@ -1393,7 +1393,7 @@ static int CmdPCSC(const char *Cmd) {
|
||||
|
||||
// ISO 15.
|
||||
|
||||
if (use_contact && IfPm3Iso14443() && smart_select(false, &card) == PM3_SUCCESS) {
|
||||
if (use_contact && IfPm3Iso14443() && smart_select(false, &card)) {
|
||||
have_card = true;
|
||||
card_type = CC_CONTACT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user