From 74eb81392a3e9c797c3ea690130271cbb5e0e66b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chlo=C3=A9=20Franke?= Date: Wed, 19 Aug 2026 15:38:42 +0200 Subject: [PATCH] Added guard for no keys provided back. --- client/src/cmdhfmfdes.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/src/cmdhfmfdes.c b/client/src/cmdhfmfdes.c index 882214fa3..f4a9cc25f 100644 --- a/client/src/cmdhfmfdes.c +++ b/client/src/cmdhfmfdes.c @@ -1721,6 +1721,11 @@ static int CmdHF14aDesChk(const char *Cmd) { PrintAndLogEx(INFO, "Loaded " _YELLOW_("%"PRIu32) " aes keys", aeskeyCountTotal); if (k3kkeyCountTotal > 0) PrintAndLogEx(INFO, "Loaded " _YELLOW_("%"PRIu32) " k3kdes keys", k3kkeyCountTotal); + + if (deskeyCountTotal + aeskeyCountTotal + k3kkeyCountTotal == 0) { + PrintAndLogEx(ERR, "No keys provided. Nothing to check."); + return PM3_EINVARG; + } } for (uint32_t x = 0; x < app_ids_len / 3; x++) {