mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
fix string formatter warning
This commit is contained in:
parent
646f1a5b97
commit
2108ab6101
1 changed files with 5 additions and 1 deletions
|
@ -310,7 +310,7 @@ static int mfp_load_keys(uint8_t **pkeyBlock, uint32_t *pkeycnt, uint8_t *userke
|
||||||
*pkeyBlock = p;
|
*pkeyBlock = p;
|
||||||
|
|
||||||
// Copy default keys to list
|
// Copy default keys to list
|
||||||
int cnt = 0;
|
size_t cnt = 0;
|
||||||
for (cnt = 0; cnt < g_mifare_plus_default_keys_len; cnt++) {
|
for (cnt = 0; cnt < g_mifare_plus_default_keys_len; cnt++) {
|
||||||
|
|
||||||
int len = hex_to_bytes(g_mifare_plus_default_keys[cnt], (uint8_t *)(*pkeyBlock + (*pkeycnt + cnt) * AES_KEY_LEN), AES_KEY_LEN);
|
int len = hex_to_bytes(g_mifare_plus_default_keys[cnt], (uint8_t *)(*pkeyBlock + (*pkeycnt + cnt) * AES_KEY_LEN), AES_KEY_LEN);
|
||||||
|
@ -348,14 +348,18 @@ static int mfp_load_keys(uint8_t **pkeyBlock, uint32_t *pkeycnt, uint8_t *userke
|
||||||
return PM3_EMALLOC;
|
return PM3_EMALLOC;
|
||||||
}
|
}
|
||||||
*pkeyBlock = p;
|
*pkeyBlock = p;
|
||||||
|
|
||||||
memcpy(*pkeyBlock + *pkeycnt * AES_KEY_LEN, dict_keys, loaded_numKeys * AES_KEY_LEN);
|
memcpy(*pkeyBlock + *pkeycnt * AES_KEY_LEN, dict_keys, loaded_numKeys * AES_KEY_LEN);
|
||||||
|
|
||||||
*pkeycnt += loaded_numKeys;
|
*pkeycnt += loaded_numKeys;
|
||||||
|
|
||||||
free(dict_keys);
|
free(dict_keys);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int CmdHFMFPInfo(const char *Cmd) {
|
static int CmdHFMFPInfo(const char *Cmd) {
|
||||||
CLIParserContext *ctx;
|
CLIParserContext *ctx;
|
||||||
CLIParserInit(&ctx, "hf mfp info",
|
CLIParserInit(&ctx, "hf mfp info",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue