From 8046f6862a8cc8b629261cb4d1886b0de3b858db Mon Sep 17 00:00:00 2001 From: Ryan Saridar <8403417+VortixDev@users.noreply.github.com> Date: Sat, 17 Apr 2021 19:08:34 +0100 Subject: [PATCH] Fix DESFire mis-annotation --- client/src/cmdhflist.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/src/cmdhflist.c b/client/src/cmdhflist.c index baf60406d..be2dfa4eb 100644 --- a/client/src/cmdhflist.c +++ b/client/src/cmdhflist.c @@ -776,6 +776,8 @@ void annotateMfDesfire(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) { pos++; for (uint8_t i = 0; i < 2; i++, pos++) { + bool found_annotation = true; + switch (cmd[pos]) { case MFDES_CREATE_APPLICATION: snprintf(exp, size, "CREATE APPLICATION"); @@ -892,8 +894,13 @@ void annotateMfDesfire(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) { snprintf(exp, size, "READ SIGNATURE"); break; default: + found_annotation = false; break; } + + if (found_annotation) { + break; + } } } else { // anything else