This commit is contained in:
iceman1001 2019-03-18 23:59:35 +01:00
commit fb9d34447e

View file

@ -1348,7 +1348,7 @@ int CmdHF14AMfNestedHard(const char *Cmd) {
case 'r':
fptr = GenerateFilename("hf-mf-", "-nonces.bin");
if (fptr == NULL)
strncpy(filename, "nonces.bin", FILE_PATH_SIZE);
strncpy(filename, "nonces.bin", FILE_PATH_SIZE - 1);
else
strncpy(filename, fptr, FILE_PATH_SIZE - 1);
@ -1536,7 +1536,7 @@ int CmdHF14AMfChk_fast(const char *Cmd) {
char buf[13];
char *fptr;
uint8_t tempkey[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
uint8_t *keyBlock = NULL, *p;
uint8_t *keyBlock, *p;
uint8_t sectorsCnt = 1;
int i, keycnt = 0;
int clen = 0;
@ -1784,7 +1784,7 @@ int CmdHF14AMfChk(const char *Cmd) {
FILE *f;
char filename[FILE_PATH_SIZE] = {0};
char buf[13];
uint8_t *keyBlock = NULL, *p;
uint8_t *keyBlock, *p;
sector_t *e_sector = NULL;
uint8_t blockNo = 0;