mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-07-16 10:03:04 -07:00
fix coverity CID 226452, 319217
This commit is contained in:
parent
72e5b9e80d
commit
dff76e81ca
2 changed files with 3 additions and 2 deletions
|
@ -1981,7 +1981,7 @@ static int CmdHF15Restore(const char *Cmd) {
|
||||||
} else {
|
} else {
|
||||||
PrintAndLogEx(SUCCESS, "Using unaddressed mode");
|
PrintAndLogEx(SUCCESS, "Using unaddressed mode");
|
||||||
}
|
}
|
||||||
PrintAndLogEx(INFO, "Using block size... %zu", blocksize);
|
PrintAndLogEx(INFO, "Using block size... %d", blocksize);
|
||||||
|
|
||||||
// 4bytes * 256 blocks. Should be enough..
|
// 4bytes * 256 blocks. Should be enough..
|
||||||
uint8_t *data = calloc(4 * 256, sizeof(uint8_t));
|
uint8_t *data = calloc(4 * 256, sizeof(uint8_t));
|
||||||
|
@ -2019,7 +2019,7 @@ static int CmdHF15Restore(const char *Cmd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((datalen % blocksize) != 0) {
|
if ((datalen % blocksize) != 0) {
|
||||||
PrintAndLogEx(WARNING, "datalen %zu isn't dividable with blocksize %zu", datalen, blocksize);
|
PrintAndLogEx(WARNING, "datalen %zu isn't dividable with blocksize %d", datalen, blocksize);
|
||||||
free(data);
|
free(data);
|
||||||
return PM3_ESOFT;
|
return PM3_ESOFT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2434,6 +2434,7 @@ static int CmdT55xxRestore(const char *Cmd) {
|
||||||
if (CmdT55xxWriteBlock(wcmd) != PM3_SUCCESS) {
|
if (CmdT55xxWriteBlock(wcmd) != PM3_SUCCESS) {
|
||||||
PrintAndLogEx(WARNING, "Warning: error writing blk 0");
|
PrintAndLogEx(WARNING, "Warning: error writing blk 0");
|
||||||
}
|
}
|
||||||
|
free(dump);
|
||||||
PrintAndLogEx(INFO, "Done!");
|
PrintAndLogEx(INFO, "Done!");
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue