- $Id: apdu.c 4304 2006-10-17 14:34:42Z wk $
2704: apdu[apdulen++] = class;
2705: apdu[apdulen++] = 0xC0;
2706: apdu[apdulen++] = 0;
2707: apdu[apdulen++] = 0;
2708: apdu[apdulen++] = len;
2709: memset (apdu+apdulen, 0, sizeof (apdu) - apdulen);
2710: resultlen = RESULTLEN;
2711: rc = send_apdu (slot, apdu, apdulen, result, &resultlen, NULL);
2712: if (rc || resultlen < 2)
in the line 270, it set the resultlen to RESULTLEN, which is 256, so when the
response data is more than 254 bytes then the call to send_apdu will failed,
change ine 2710 to
resultlen = RESULTLE + 2;
will resolve this issure, or modify the definition of RESULTLEN to other value
(258), such modify is still compatible with old cards.