From: marshmellow42 <marshmellowrf@gmail.com>
Date: Sun, 24 May 2015 02:35:50 +0000 (-0400)
Subject: fix mfu dump getbigbuffer bug
X-Git-Tag: v2.1.0~11^2
X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/0ce03d9ab0084cd34f483b24e97ef0a92b11284b?ds=sidebyside;hp=012c0761bd69ac3bba5e89ae4347c5e16aa81701

fix mfu dump getbigbuffer bug

Thanks @iceman1001 for catching my oops, and fixing it :)
---

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;