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
|
@ -13,7 +13,6 @@
|
|||
#include "proxmark3.h"
|
||||
#include "ui.h"
|
||||
#include "cmddata.h"
|
||||
#include "data.h"
|
||||
#include "cmdlfcotag.h"
|
||||
#include "lfdemod.h"
|
||||
#include "usb_cmd.h"
|
||||
|
@ -99,10 +98,9 @@ int CmdCOTAGRead(const char *Cmd) {
|
|||
getSamples(0, true); break;
|
||||
}
|
||||
case 1: {
|
||||
GetFromBigBuf(DemodBuffer, COTAG_BITS, 0);
|
||||
DemodBufferLen = COTAG_BITS;
|
||||
UsbCommand response;
|
||||
if ( !WaitForResponseTimeout(CMD_ACK, &response, 1000) ) {
|
||||
DemodBufferLen = COTAG_BITS;
|
||||
if (!GetFromBigBuf(DemodBuffer, COTAG_BITS, 0, &response, 1000, true)) {
|
||||
PrintAndLog("timeout while waiting for reply.");
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue