From 4b5913cc7c558afff5cc39569a132acac70f3d0c Mon Sep 17 00:00:00 2001 From: zxkmm Date: Sat, 4 Jan 2025 22:52:05 +0800 Subject: [PATCH] check len instead of the actual buffer as per iceman request --- client/src/cmdhfmf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 15a4d17f5..0c94f0f68 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -2698,7 +2698,7 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) { // read uid to generate a filename for the key file char suffix[FILE_PATH_SIZE]; - if (outfilename[0] != '\0') { + if (outfnlen) { snprintf(suffix, sizeof(suffix), "-key-%s.bin", outfilename); } else { snprintf(suffix, sizeof(suffix), "-key.bin"); @@ -3232,7 +3232,7 @@ all_found: free(fptr); - if (outfilename[0] != '\0') { + if (outfnlen) { snprintf(suffix, sizeof(suffix), "-dump-%s", outfilename); } else { snprintf(suffix, sizeof(suffix), "-dump");