mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-14 02:26:59 -07:00
rework of GetFromBigBuf() (#597)
* this should fix crashes reported in issue #497 * don't allow receiver thread to write directly into arbitrary main thread's memory * instead use cmdBuffer[] for CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K as well * add timeout and warning options to GetFromBigBuf(), same as in WaitForResponseTimeoutW() * move GetFromBigBuf() from data.c to comms.c * remove data.c and data.h
This commit is contained in:
parent
03cdcca03f
commit
babca445ff
27 changed files with 87 additions and 116 deletions
|
@ -16,7 +16,6 @@
|
|||
#include <sys/stat.h>
|
||||
#include <ctype.h>
|
||||
#include "iso14443crc.h" // Can also be used for iClass, using 0xE012 as CRC-type
|
||||
#include "data.h"
|
||||
#include "proxmark3.h"
|
||||
#include "ui.h"
|
||||
#include "cmdparser.h"
|
||||
|
@ -750,8 +749,7 @@ int CmdHFiClassReader_Dump(const char *Cmd) {
|
|||
blocksRead = (sizeof(tag_data)/8) - blockno;
|
||||
}
|
||||
// response ok - now get bigbuf content of the dump
|
||||
GetFromBigBuf(tag_data+(blockno*8), blocksRead*8, startindex);
|
||||
WaitForResponse(CMD_ACK,NULL);
|
||||
GetFromBigBuf(tag_data+(blockno*8), blocksRead*8, startindex, NULL, -1, false);
|
||||
size_t gotBytes = blocksRead*8 + blockno*8;
|
||||
|
||||
// try AA2
|
||||
|
@ -793,8 +791,7 @@ int CmdHFiClassReader_Dump(const char *Cmd) {
|
|||
blocksRead = (sizeof(tag_data) - gotBytes)/8;
|
||||
}
|
||||
// get dumped data from bigbuf
|
||||
GetFromBigBuf(tag_data+gotBytes, blocksRead*8, startindex);
|
||||
WaitForResponse(CMD_ACK,NULL);
|
||||
GetFromBigBuf(tag_data+gotBytes, blocksRead*8, startindex, NULL, -1, false);
|
||||
|
||||
gotBytes += blocksRead*8;
|
||||
} else { //field is still on - turn it off...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue