mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-31 17:36:27 +08:00
chg: 'trace list' - allocating memory
This commit is contained in:
parent
7ecd35943c
commit
c30e282f5e
1 changed files with 3 additions and 3 deletions
|
@ -448,7 +448,6 @@ int CmdTraceList(const char *Cmd) {
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
str_lower(type);
|
str_lower(type);
|
||||||
PrintAndLogEx(WARNING, "to lower");
|
|
||||||
|
|
||||||
// validate type of output
|
// validate type of output
|
||||||
if (strcmp(type, "iclass") == 0) protocol = ICLASS;
|
if (strcmp(type, "iclass") == 0) protocol = ICLASS;
|
||||||
|
@ -473,10 +472,11 @@ int CmdTraceList(const char *Cmd) {
|
||||||
//Validations
|
//Validations
|
||||||
if (errors) return usage_trace_list();
|
if (errors) return usage_trace_list();
|
||||||
|
|
||||||
|
|
||||||
uint16_t tracepos = 0;
|
uint16_t tracepos = 0;
|
||||||
|
// reserv some space.
|
||||||
|
trace = malloc(USB_CMD_DATA_SIZE);
|
||||||
|
|
||||||
if ( !isOnline ) {
|
if ( isOnline ) {
|
||||||
// Query for the size of the trace
|
// Query for the size of the trace
|
||||||
UsbCommand response;
|
UsbCommand response;
|
||||||
GetFromBigBuf(trace, USB_CMD_DATA_SIZE, 0);
|
GetFromBigBuf(trace, USB_CMD_DATA_SIZE, 0);
|
||||||
|
|
Loading…
Add table
Reference in a new issue