1509 |
|
|
1510 |
if (cbRecvLength) |
if (cbRecvLength) |
1511 |
{ |
{ |
|
/* FIXME: handle responses with length > 448 bytes */ |
|
|
if (cbRecvLength > 448) |
|
|
{ |
|
|
#ifdef WITH_SCARD_DEBUG |
|
|
printf("[RECV LEN %d -> %d]\n", (unsigned int) cbRecvLength, 400); |
|
|
#endif |
|
|
cbRecvLength = 448; |
|
|
} |
|
|
|
|
|
|
|
1512 |
recvBuf = SC_xmalloc(&lcHandle, cbRecvLength); |
recvBuf = SC_xmalloc(&lcHandle, cbRecvLength); |
1513 |
if (!recvBuf) |
if (!recvBuf) |
1514 |
return SC_returnNoMemoryError(&lcHandle, in, out); |
return SC_returnNoMemoryError(&lcHandle, in, out); |
1588 |
rv = SCardTransmit(myHCard, myPioSendPci, sendBuf, (MYPCSC_DWORD) cbSendLength, |
rv = SCardTransmit(myHCard, myPioSendPci, sendBuf, (MYPCSC_DWORD) cbSendLength, |
1589 |
myPioRecvPci, recvBuf, &myCbRecvLength); |
myPioRecvPci, recvBuf, &myCbRecvLength); |
1590 |
cbRecvLength = myCbRecvLength; |
cbRecvLength = myCbRecvLength; |
1591 |
|
|
1592 |
|
/* FIXME: handle responses with length > 448 bytes */ |
1593 |
|
if (cbRecvLength > 448) |
1594 |
|
{ |
1595 |
|
warning("Card response limited from %d to 448 bytes!\n", cbRecvLength); |
1596 |
|
#ifdef WITH_SCARD_DEBUG |
1597 |
|
printf("[RECV LEN %d -> %d]\n", (unsigned int) cbRecvLength, 400); |
1598 |
|
#endif |
1599 |
|
cbRecvLength = 448; |
1600 |
|
} |
1601 |
|
|
1602 |
if (pioRecvPci) |
if (pioRecvPci) |
1603 |
{ |
{ |
1604 |
copyIORequest_MyPCSCToServer(myPioRecvPci, pioRecvPci); |
copyIORequest_MyPCSCToServer(myPioRecvPci, pioRecvPci); |