mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-24 08:05:13 +08:00
cppchecker fix - hf mfu restore and key param
This commit is contained in:
parent
6579ca908e
commit
fd7a25beed
1 changed files with 9 additions and 1 deletions
|
@ -992,7 +992,6 @@ uint32_t GetHF14AMfU_Type(void) {
|
|||
else if (memcmp(version, "\x00\x04\x04\x05\x02\x01\x15", 7) == 0) { tagtype = NTAG_I2C_2K; break; }
|
||||
else if (memcmp(version, "\x00\x04\x04\x05\x02\x02\x13", 7) == 0) { tagtype = NTAG_I2C_1K_PLUS; break; }
|
||||
else if (memcmp(version, "\x00\x04\x04\x05\x02\x02\x15", 7) == 0) { tagtype = NTAG_I2C_2K_PLUS; break; }
|
||||
else if (memcmp(version, "\x00\x34\x21\x01\x01\x00\x0E", 7) == 0) { tagtype = UL; break; }
|
||||
else if (version[2] == 0x04) { tagtype = NTAG; break; }
|
||||
else if (version[2] == 0x03) { tagtype = UL_EV1; }
|
||||
break;
|
||||
|
@ -2064,7 +2063,16 @@ static int CmdHF14AMfURestore(const char *Cmd) {
|
|||
bool verbose = arg_get_lit(ctx, 7);
|
||||
CLIParserFree(ctx);
|
||||
|
||||
|
||||
bool has_key = false;
|
||||
if (ak_len > 0) {
|
||||
if (ak_len != 4 || ak_len != 16) {
|
||||
PrintAndLogEx(ERR, "Wrong key length. expected 4 or 16, got %d", ak_len);
|
||||
return PM3_EINVARG;
|
||||
} else {
|
||||
has_key = true;
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t *dump = NULL;
|
||||
size_t bytes_read = 0;
|
||||
|
|
Loading…
Reference in a new issue