mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
Fixed a typo and added and improved the checks for the returned data of loadFileDICTIONARY_safe.
This commit is contained in:
parent
9dc3c39a95
commit
ae7b0de2c9
2 changed files with 2 additions and 2 deletions
|
@ -2129,7 +2129,7 @@ static int CmdT55xxChkPwds(const char *Cmd) {
|
||||||
uint16_t keycount = 0;
|
uint16_t keycount = 0;
|
||||||
|
|
||||||
int res = loadFileDICTIONARY_safe(filename, &keyBlock, 4, &keycount);
|
int res = loadFileDICTIONARY_safe(filename, &keyBlock, 4, &keycount);
|
||||||
if (res || keycount == 0 || keyBlock == NULL) {
|
if (res || keycount <= 0 || keyBlock == NULL) {
|
||||||
PrintAndLogEx(WARNING, "No keys found in file");
|
PrintAndLogEx(WARNING, "No keys found in file");
|
||||||
if (keyBlock != NULL) free(keyBlock);
|
if (keyBlock != NULL) free(keyBlock);
|
||||||
return PM3_ESOFT;
|
return PM3_ESOFT;
|
||||||
|
|
|
@ -163,7 +163,7 @@ int loadFileJSON(const char *preferredName, void *data, size_t maxdatalen, size_
|
||||||
int loadFileDICTIONARY(const char *preferredName, void *data, size_t *datalen, uint8_t keylen, uint16_t *keycnt);
|
int loadFileDICTIONARY(const char *preferredName, void *data, size_t *datalen, uint8_t keylen, uint16_t *keycnt);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Utility function to load data from a DICTIONARY safely into a textfile. This method takes a preferred name.
|
* @brief Utility function to load data safely from a DICTIONARY textfile. This method takes a preferred name.
|
||||||
* E.g. mfc_default_keys.dic
|
* E.g. mfc_default_keys.dic
|
||||||
*
|
*
|
||||||
* @param preferredName
|
* @param preferredName
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue