fix coverity CID 226452, 319217

This commit is contained in:
iceman1001 2021-04-16 08:43:20 +02:00
parent 72e5b9e80d
commit dff76e81ca
2 changed files with 3 additions and 2 deletions

View file

@ -1981,7 +1981,7 @@ static int CmdHF15Restore(const char *Cmd) {
} else {
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..
uint8_t *data = calloc(4 * 256, sizeof(uint8_t));
@ -2019,7 +2019,7 @@ static int CmdHF15Restore(const char *Cmd) {
}
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);
return PM3_ESOFT;
}

View file

@ -2434,6 +2434,7 @@ static int CmdT55xxRestore(const char *Cmd) {
if (CmdT55xxWriteBlock(wcmd) != PM3_SUCCESS) {
PrintAndLogEx(WARNING, "Warning: error writing blk 0");
}
free(dump);
PrintAndLogEx(INFO, "Done!");
return PM3_SUCCESS;
}