From e91c46616af5e2c26a0ec90b44aec93539a3c04e Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 2 Nov 2020 17:27:39 +0100 Subject: [PATCH] fix, coverity 303794 --- client/src/cmdhfmfdes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/cmdhfmfdes.c b/client/src/cmdhfmfdes.c index 5ea303f6d..8a16be64e 100644 --- a/client/src/cmdhfmfdes.c +++ b/client/src/cmdhfmfdes.c @@ -2116,19 +2116,20 @@ static int desfire_authenticate(int cmdAuthMode, int cmdAuthAlgo, uint8_t *aid, PrintAndLogEx(FAILED, "KDF AN10922 algo requires an input of length 1-31 bytes."); return PM3_EINVARG; } + break; case MFDES_KDF_ALGO_GALLAGHER: // TODO: 2TDEA and 3TDEA keys use an input length of 1-15 bytes if (cmdAuthAlgo != MFDES_ALGO_AES) { PrintAndLogEx(FAILED, "Crypto algo not valid for the KDF AN10922 algo."); return PM3_EINVARG; } + break; // KDF input arg is ignored as it'll be generated. case MFDES_KDF_ALGO_NONE: break; default: PrintAndLogEx(WARNING, "KDF algo %d is not supported.", cmdKdfAlgo); return PM3_EINVARG; - break; } // KEY