Add files via upload

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
This commit is contained in:
Niel Nielsen authored and Philippe Teuwen committed 2026-09-01 17:57:31 +02:00
1 parent 3628681a50
commit 9df1c62ec5
6 files changed
+17 -15

No files matched your search

+3 -3
View File
@@ -1139,7 +1139,7 @@ static int download_trace(void) {
gs_traceLen = 0;
gs_trace = calloc(PM3_CMD_DATA_SIZE, sizeof(uint8_t));
gs_trace = calloc(pm3_max_cmd_data_size(), sizeof(uint8_t));
if (gs_trace == NULL) {
PrintAndLogEx(WARNING, "Failed to allocate memory");
return PM3_EMALLOC;
@@ -1149,7 +1149,7 @@ static int download_trace(void) {
// Query for the size of the trace, downloading PM3_CMD_DATA_SIZE
PacketResponseNG resp;
if (!GetFromDevice(BIG_BUF, gs_trace, PM3_CMD_DATA_SIZE, 0, NULL, 0, &resp, 4000, true)) {
if (!GetFromDevice(BIG_BUF, gs_trace, pm3_max_cmd_data_size(), 0, NULL, 0, &resp, 4000, true)) {
PrintAndLogEx(WARNING, "timeout while waiting for reply");
free(gs_trace);
gs_trace = NULL;
@@ -1166,7 +1166,7 @@ static int download_trace(void) {
gs_traceLen = ((const download_done_t *)resp.data.asBytes)->extra;
// if tracelog buffer was larger and we need to download more.
if (gs_traceLen > PM3_CMD_DATA_SIZE) {
if (gs_traceLen > pm3_max_cmd_data_size()) {
free(gs_trace);
gs_trace = calloc(gs_traceLen, sizeof(uint8_t));