From 0ce03d9ab0084cd34f483b24e97ef0a92b11284b Mon Sep 17 00:00:00 2001 From: marshmellow42 Date: Sat, 23 May 2015 22:35:50 -0400 Subject: [PATCH 1/1] fix mfu dump getbigbuffer bug Thanks @iceman1001 for catching my oops, and fixing it :) --- armsrc/mifarecmd.c | 2 +- client/cmdhfmfu.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index 0586a25d..8355cd19 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -335,7 +335,7 @@ void MifareUReadCard(uint8_t arg0, uint16_t arg1, uint8_t arg2, uint8_t *datain) if (MF_DBGLEVEL >= MF_DBG_EXTENDED) Dbprintf("Blocks read %d", countblocks); countblocks *= 4; - cmd_send(CMD_ACK, 1, countblocks, countblocks, 0, 0); + cmd_send(CMD_ACK, 1, countblocks, BigBuf_max_traceLen(), 0, 0); FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); LEDsoff(); } diff --git a/client/cmdhfmfu.c b/client/cmdhfmfu.c index 07c379bc..19103298 100644 --- a/client/cmdhfmfu.c +++ b/client/cmdhfmfu.c @@ -1106,12 +1106,13 @@ int CmdHF14AMfUDump(const char *Cmd){ return 1; } + uint32_t startindex = resp.arg[2]; uint32_t bufferSize = resp.arg[1]; if (bufferSize > sizeof(data)) { PrintAndLog("Data exceeded Buffer size!"); bufferSize = sizeof(data); } - GetFromBigBuf(data, bufferSize, 0); + GetFromBigBuf(data, bufferSize, startindex); WaitForResponse(CMD_ACK,NULL); Pages = bufferSize/4; -- 2.39.5