X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/4c6f2d48fbe8d57c6fbd80b7e4b38acaf6355e47..5644791bdb264300ebfac1c2e51cfc7d231c4070:/armsrc/epa.c diff --git a/armsrc/epa.c b/armsrc/epa.c index b1f0a187..fb19656d 100644 --- a/armsrc/epa.c +++ b/armsrc/epa.c @@ -108,9 +108,9 @@ size_t EPA_Parse_CardAccess(uint8_t *data, if (data[index] == 0x31 || data[index] == 0x30) { // enter the set (skip tag + length) index += 2; - // extended length + // check for extended length if ((data[index - 1] & 0x80) != 0) { - index += (data[index] & 0x7F); + index += (data[index-1] & 0x7F); } } // OID @@ -434,7 +434,8 @@ int EPA_Setup() // send the PPS request ReaderTransmit((uint8_t *)pps, sizeof(pps), NULL); uint8_t pps_response[3]; - return_code = ReaderReceive(pps_response); + uint8_t pps_response_par[1]; + return_code = ReaderReceive(pps_response, pps_response_par); if (return_code != 3 || pps_response[0] != 0xD0) { return return_code == 0 ? 2 : return_code; }