0
0
mirror of https://github.com/FreeRDP/FreeRDP.git synced 2024-12-13 03:34:43 +08:00

Merge pull request from Awingu/cbytes-fix

Fix inconsistent cchReaderLen value between WinScard and pcsc-lite.
This commit is contained in:
akallabeth 2018-04-25 09:00:52 +02:00 committed by GitHub
commit d5f9da2b3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1142,7 +1142,13 @@ static LONG smartcard_StatusW_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERAT
if (!call->fmszReaderNamesIsNULL)
ret.mszReaderNames = (BYTE*) mszReaderNames;
// WinScard returns the number of CHARACTERS whereas pcsc-lite returns the
// number of BYTES.
#ifdef _WIN32
ret.cBytes = cchReaderLen * 2;
#else
ret.cBytes = cchReaderLen;
#endif
if (call->cbAtrLen)
ret.cbAtrLen = cbAtrLen;