From 8d9751ebe42fc2912e86c01109e417e1ead5a09f Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 28 Aug 2019 21:16:09 +0200 Subject: [PATCH] fix: uint cant be negative.. --- client/cmdlft55xx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/cmdlft55xx.c b/client/cmdlft55xx.c index 965a5db0b..46cc3e017 100644 --- a/client/cmdlft55xx.c +++ b/client/cmdlft55xx.c @@ -2129,9 +2129,11 @@ static int CmdT55xxChkPwds(const char *Cmd) { uint16_t keycount = 0; int res = loadFileDICTIONARY_safe(filename, (void**) &keyBlock, 4, &keycount); - if (res != PM3_SUCCESS || keycount <= 0 || keyBlock == NULL) { + if (res != PM3_SUCCESS || keycount == 0 || keyBlock == NULL) { PrintAndLogEx(WARNING, "No keys found in file"); - if (keyBlock != NULL) free(keyBlock); + if (keyBlock != NULL) + free(keyBlock); + return PM3_ESOFT; }