unify test - step 2

This commit is contained in:
iceman1001 committed 2025-03-25 10:17:42 +01:00
1 parent 875b3c44b4
commit ad292e8810
70 files changed
+272 -195

No files matched your search

+3 -2
View File
@@ -72,7 +72,7 @@ static char *GenerateFilename(iso14a_card_select_t *card, const char *prefix, co
}
char *fptr = calloc(sizeof(char) * (strlen(prefix) + strlen(suffix)) + sizeof(card->uid) * 2 + 1, sizeof(uint8_t));
if (fptr == NULL) {
PrintAndLogEx(FAILED, "Memory allocation failed");
PrintAndLogEx(WARNING, "Failed to allocate memory");
return NULL;
}
strcpy(fptr, prefix);
@@ -344,8 +344,9 @@ static int CmdHFFudanDump(const char *Cmd) {
// create filename if none was given
if (strlen(dataFilename) < 1) {
char *fptr = GenerateFilename(&card, "hf-fudan-", "-dump");
if (fptr == NULL)
if (fptr == NULL) {
return PM3_ESOFT;
}
strcpy(dataFilename, fptr);
free(fptr);