fix CID #405224
This commit is contained in:
1 parent
7504413f0b
commit
f9da8615e4
2 files changed
+4
-3
No files matched your search
@@ -2973,7 +2973,8 @@ all_found:
|
||||
free(fptr);
|
||||
return PM3_ESOFT;
|
||||
}
|
||||
strcpy(filename, fptr);
|
||||
|
||||
strncpy(filename, fptr, sizeof(filename) - 1);
|
||||
free(fptr);
|
||||
|
||||
saveFile(filename, ".bin", dump, bytes);
|
||||
@@ -5411,7 +5412,7 @@ static int CmdHF14AMfice(const char *Cmd) {
|
||||
fptr = GenerateFilename("hf-mf-", "-nonces.bin");
|
||||
if (fptr == NULL)
|
||||
return PM3_EFILE;
|
||||
strcpy(filename, fptr);
|
||||
strncpy(filename, fptr, sizeof(filename) - 1);
|
||||
free(fptr);
|
||||
}
|
||||
|
||||
|
||||
@@ -2870,7 +2870,7 @@ static int CmdHF14AMfURestore(const char *Cmd) {
|
||||
if (fnlen == 0) {
|
||||
char *fptr = GenerateFilename("hf-mfu-", "-dump.bin");
|
||||
if (fptr != NULL) {
|
||||
strcpy(filename, fptr);
|
||||
strncpy(filename, fptr, sizeof(filename) - 1);
|
||||
} else {
|
||||
snprintf(filename, sizeof(filename), "dumpdata.bin");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user