Update upper length for ATR and the comments.

This commit is contained in:
Arya Senna 2020-11-03 20:13:42 +01:00 committed by Frank Morgner
parent 64de4a5001
commit 4cc0d0c7c9
1 changed files with 2 additions and 2 deletions

View File

@ -6870,8 +6870,8 @@ DWORD WINAPI CardAcquireContext(__inout PCARD_DATA pCardData, __in DWORD dwFlags
MD_FUNC_RETURN(pCardData, 1, SCARD_E_INVALID_PARAMETER);
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)
/* <2 length or >0x22 are not ISO compliant */
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)