From 7bb8c629ba67217d13fe19e604732e9c6d145048 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 8 Jan 2019 20:14:46 +0100 Subject: [PATCH] fix: remove warnings --- client/cmdhfmf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index 985965d72..00e29105f 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -1294,9 +1294,9 @@ 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); else - strncpy(filename,fptr, FILE_PATH_SIZE); + strncpy(filename, fptr, FILE_PATH_SIZE-1); nonce_file_read = true; if (!param_gethex(Cmd, cmdp+1, trgkey, 12)) { @@ -1367,7 +1367,7 @@ int CmdHF14AMfNestedHard(const char *Cmd) { fptr = GenerateFilename("hf-mf-","-nonces.bin"); if (fptr == NULL) return 1; - strncpy(filename, fptr, FILE_PATH_SIZE); + strncpy(filename, fptr, FILE_PATH_SIZE-1); break; case 'u': param_getstr(Cmd, cmdp+1, szTemp, FILE_PATH_SIZE-20);