From 64de4a5001f0a2c8d60c564fb2aea882c19f64f3 Mon Sep 17 00:00:00 2001 From: Arya Senna Date: Sun, 1 Nov 2020 17:02:23 +0100 Subject: [PATCH] Update minidriver.c Fix check of ATR length for Ledger --- src/minidriver/minidriver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/minidriver/minidriver.c b/src/minidriver/minidriver.c index cf854efb..c4c6c46a 100644 --- a/src/minidriver/minidriver.c +++ b/src/minidriver/minidriver.c @@ -6871,7 +6871,7 @@ DWORD WINAPI CardAcquireContext(__inout PCARD_DATA pCardData, __in DWORD dwFlags if ( pCardData->pwszCardName == NULL ) MD_FUNC_RETURN(pCardData, 1, SCARD_E_INVALID_PARAMETER); /* <2 length or >=0x22 are not ISO compliant */ - if (pCardData->cbAtr >= 0x22 || pCardData->cbAtr <= 0x2) + if (pCardData->cbAtr >= 0x22 || pCardData->cbAtr < 0x2) MD_FUNC_RETURN(pCardData, 1, SCARD_E_INVALID_PARAMETER); /* ATR beginning by 0x00 or 0xFF are not ISO compliant */ if (pCardData->pbAtr[0] == 0xFF || pCardData->pbAtr[0] == 0x00)