Merge pull request #1394 from merlokk/cov

coverity 353982 353927
This commit is contained in:
Oleg Moiseenko 2021-07-28 16:37:53 +03:00 committed by GitHub
commit 76e93227cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3912,6 +3912,7 @@ static int CmdHF14ADesChangeKey(const char *Cmd) {
CLIGetHexWithReturn(ctx, 13, keydata, &oldkeylen);
if (oldkeylen && oldkeylen != desfire_get_key_length(oldkeytype)) {
PrintAndLogEx(ERR, "%s old key must have %d bytes length instead of %d.", CLIGetOptionListStr(DesfireAlgoOpts, oldkeytype), desfire_get_key_length(oldkeytype), oldkeylen);
CLIParserFree(ctx);
return PM3_EINVARG;
}
if (oldkeylen)
@ -6438,7 +6439,7 @@ static int CmdHF14ADesReadData(const char *Cmd) {
if (resplen > 0) {
size_t reccount = resplen / reclen;
PrintAndLogEx(SUCCESS, "Read %u bytes from file 0x%02x from record %u record count %zu record length %zu", resplen, fnum, offset, reccount, reclen);
PrintAndLogEx(SUCCESS, "Read %u bytes from file 0x%02x from record %d record count %zu record length %zu", resplen, fnum, offset, reccount, reclen);
if (reccount > 1)
PrintAndLogEx(SUCCESS, "Lastest record at the bottom.");
for (int i = 0; i < reccount; i++) {