stablize download trace more
This commit is contained in:
1 parent
0f11c5c4d1
commit
87b5ee37c9
1 file changed
+8
-1
@@ -1156,7 +1156,14 @@ static int download_trace(void) {
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
gs_traceLen = resp.oldarg[2];
|
||||
// the download terminator carries the trace length in download_done_t.extra
|
||||
if (resp.length < sizeof(download_done_t)) {
|
||||
PrintAndLogEx(WARNING, "short download reply from device");
|
||||
free(gs_trace);
|
||||
gs_trace = NULL;
|
||||
return PM3_ESOFT;
|
||||
}
|
||||
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) {
|
||||
|
||||
Reference in new issue
Block a user