Workaround for getting ATR on OS X 10.10

This commit is contained in:
Frank Morgner
2015-05-17 22:36:31 +02:00
parent 7215a6ed3f
commit 70e72f8c14

View File

@@ -237,7 +237,13 @@ IFDHGetCapabilities (DWORD Lun, DWORD Tag, PDWORD Length, PUCHAR Value)
} }
Log2(PCSC_LOG_DEBUG, "Got ATR (%d bytes)", size); Log2(PCSC_LOG_DEBUG, "Got ATR (%d bytes)", size);
#ifndef __APPLE__
if (*Length < size) { if (*Length < size) {
#else
/* Apple's new SmartCardServices on OS X 10.10 doesn't set the
* length correctly so we only check for the maximum */
if (MAX_ATR_SIZE < size) {
#endif
free(atr); free(atr);
Log1(PCSC_LOG_ERROR, "Not enough memory for ATR"); Log1(PCSC_LOG_ERROR, "Not enough memory for ATR");
goto err; goto err;