fix mfu dump getbigbuffer bug

Thanks @iceman1001 for catching my oops, and fixing it :)
This commit is contained in:
marshmellow42 2015-05-23 22:35:50 -04:00
parent 012c0761bd
commit 0ce03d9ab0
2 changed files with 3 additions and 2 deletions

View file

@ -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); if (MF_DBGLEVEL >= MF_DBG_EXTENDED) Dbprintf("Blocks read %d", countblocks);
countblocks *= 4; 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); FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
LEDsoff(); LEDsoff();
} }

View file

@ -1106,12 +1106,13 @@ int CmdHF14AMfUDump(const char *Cmd){
return 1; return 1;
} }
uint32_t startindex = resp.arg[2];
uint32_t bufferSize = resp.arg[1]; uint32_t bufferSize = resp.arg[1];
if (bufferSize > sizeof(data)) { if (bufferSize > sizeof(data)) {
PrintAndLog("Data exceeded Buffer size!"); PrintAndLog("Data exceeded Buffer size!");
bufferSize = sizeof(data); bufferSize = sizeof(data);
} }
GetFromBigBuf(data, bufferSize, 0); GetFromBigBuf(data, bufferSize, startindex);
WaitForResponse(CMD_ACK,NULL); WaitForResponse(CMD_ACK,NULL);
Pages = bufferSize/4; Pages = bufferSize/4;