mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
fix CID #405224
This commit is contained in:
parent
7504413f0b
commit
f9da8615e4
2 changed files with 4 additions and 3 deletions
|
@ -2973,7 +2973,8 @@ all_found:
|
||||||
free(fptr);
|
free(fptr);
|
||||||
return PM3_ESOFT;
|
return PM3_ESOFT;
|
||||||
}
|
}
|
||||||
strcpy(filename, fptr);
|
|
||||||
|
strncpy(filename, fptr, sizeof(filename) - 1);
|
||||||
free(fptr);
|
free(fptr);
|
||||||
|
|
||||||
saveFile(filename, ".bin", dump, bytes);
|
saveFile(filename, ".bin", dump, bytes);
|
||||||
|
@ -5411,7 +5412,7 @@ static int CmdHF14AMfice(const char *Cmd) {
|
||||||
fptr = GenerateFilename("hf-mf-", "-nonces.bin");
|
fptr = GenerateFilename("hf-mf-", "-nonces.bin");
|
||||||
if (fptr == NULL)
|
if (fptr == NULL)
|
||||||
return PM3_EFILE;
|
return PM3_EFILE;
|
||||||
strcpy(filename, fptr);
|
strncpy(filename, fptr, sizeof(filename) - 1);
|
||||||
free(fptr);
|
free(fptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2870,7 +2870,7 @@ static int CmdHF14AMfURestore(const char *Cmd) {
|
||||||
if (fnlen == 0) {
|
if (fnlen == 0) {
|
||||||
char *fptr = GenerateFilename("hf-mfu-", "-dump.bin");
|
char *fptr = GenerateFilename("hf-mfu-", "-dump.bin");
|
||||||
if (fptr != NULL) {
|
if (fptr != NULL) {
|
||||||
strcpy(filename, fptr);
|
strncpy(filename, fptr, sizeof(filename) - 1);
|
||||||
} else {
|
} else {
|
||||||
snprintf(filename, sizeof(filename), "dumpdata.bin");
|
snprintf(filename, sizeof(filename), "dumpdata.bin");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue