mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-22 14:13:42 -07:00
unified lengths and increased buffer. 50 bytes for AID is enough
This commit is contained in:
parent
234f079a99
commit
c08aac69ed
1 changed files with 8 additions and 5 deletions
|
@ -10,6 +10,9 @@
|
|||
|
||||
#include "cmdemv.h"
|
||||
|
||||
#define APDU_RES_LEN 520
|
||||
#define APDU_AID_LEN 50
|
||||
|
||||
int UsageCmdHFEMVSelect(void) {
|
||||
PrintAndLog("HELP : Executes select applet command:\n");
|
||||
PrintAndLog("Usage: hf emv select [-s][-k][-t] <HEX applet AID>\n");
|
||||
|
@ -24,7 +27,7 @@ int UsageCmdHFEMVSelect(void) {
|
|||
}
|
||||
|
||||
int CmdHFEMVSelect(const char *cmd) {
|
||||
uint8_t data[50] = {0};
|
||||
uint8_t data[APDU_AID_LEN] = {0};
|
||||
int datalen = 0;
|
||||
bool activateField = false;
|
||||
bool leaveSignalON = false;
|
||||
|
@ -85,7 +88,7 @@ int CmdHFEMVSelect(const char *cmd) {
|
|||
}
|
||||
|
||||
// exec
|
||||
uint8_t buf[200] = {0};
|
||||
uint8_t buf[APDU_RES_LEN] = {0};
|
||||
size_t len = 0;
|
||||
uint16_t sw = 0;
|
||||
int res = EMVSelect(activateField, leaveSignalON, data, datalen, buf, sizeof(buf), &len, &sw, NULL);
|
||||
|
@ -242,7 +245,7 @@ int CmdHFEMVPPSE(const char *cmd) {
|
|||
}
|
||||
|
||||
// exec
|
||||
uint8_t buf[200] = {0};
|
||||
uint8_t buf[APDU_RES_LEN] = {0};
|
||||
size_t len = 0;
|
||||
uint16_t sw = 0;
|
||||
int res = EMVSelectPSE(activateField, leaveSignalON, PSENum, buf, sizeof(buf), &len, &sw);
|
||||
|
@ -282,10 +285,10 @@ int CmdHFEMVExec(const char *cmd) {
|
|||
bool decodeTLV = false;
|
||||
bool forceSearch = false;
|
||||
|
||||
uint8_t buf[300] = {0};
|
||||
uint8_t buf[APDU_RES_LEN] = {0};
|
||||
size_t len = 0;
|
||||
uint16_t sw = 0;
|
||||
uint8_t AID[50] = {0};
|
||||
uint8_t AID[APDU_AID_LEN] = {0};
|
||||
size_t AIDlen = 0;
|
||||
|
||||
int res;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue