fix coverity CID 226452, 319217
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user