mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
we use calloc
This commit is contained in:
parent
0b2081ff32
commit
7549f53b63
1 changed files with 9 additions and 6 deletions
|
@ -3638,8 +3638,8 @@ static int CmdHFiClassCheckKeys(const char *Cmd) {
|
||||||
} else {
|
} else {
|
||||||
// Generate 5000 keys using VB6 KDF
|
// Generate 5000 keys using VB6 KDF
|
||||||
keycount = 5000;
|
keycount = 5000;
|
||||||
keyBlock = malloc(keycount * 8);
|
keyBlock = calloc(1, keycount * 8);
|
||||||
if (!keyBlock) {
|
if (keyBlock == NULL) {
|
||||||
return PM3_EMALLOC;
|
return PM3_EMALLOC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4229,8 +4229,8 @@ static int CmdHFiClassLookUp(const char *Cmd) {
|
||||||
} else {
|
} else {
|
||||||
// Generate 5000 keys using VB6 KDF
|
// Generate 5000 keys using VB6 KDF
|
||||||
keycount = 5000;
|
keycount = 5000;
|
||||||
keyBlock = malloc(keycount * 8);
|
keyBlock = calloc(1, keycount * 8);
|
||||||
if (!keyBlock) {
|
if (keyBlock == NULL) {
|
||||||
return PM3_EMALLOC;
|
return PM3_EMALLOC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4250,10 +4250,13 @@ static int CmdHFiClassLookUp(const char *Cmd) {
|
||||||
PrintAndLogEx(INFO, "Generating diversified keys...");
|
PrintAndLogEx(INFO, "Generating diversified keys...");
|
||||||
GenerateMacKeyFrom(csn, CCNR, use_raw, use_elite, keyBlock, keycount, prekey);
|
GenerateMacKeyFrom(csn, CCNR, use_raw, use_elite, keyBlock, keycount, prekey);
|
||||||
|
|
||||||
if (use_elite)
|
if (use_elite) {
|
||||||
PrintAndLogEx(INFO, "Using " _YELLOW_("elite algo"));
|
PrintAndLogEx(INFO, "Using " _YELLOW_("elite algo"));
|
||||||
if (use_raw)
|
}
|
||||||
|
|
||||||
|
if (use_raw) {
|
||||||
PrintAndLogEx(INFO, "Using " _YELLOW_("raw mode"));
|
PrintAndLogEx(INFO, "Using " _YELLOW_("raw mode"));
|
||||||
|
}
|
||||||
|
|
||||||
PrintAndLogEx(INFO, "Sorting...");
|
PrintAndLogEx(INFO, "Sorting...");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue