From 8181a0585e36d7c20e6ba4eea3db955cdaff542e Mon Sep 17 00:00:00 2001 From: Piergiacomo De Marchi Date: Fri, 11 Dec 2020 17:43:18 +0100 Subject: [PATCH] Fixing counter increment in ctap_filter_invalid_credentials() --- fido2/ctap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fido2/ctap.c b/fido2/ctap.c index 0a0a65c..c18bdc7 100644 --- a/fido2/ctap.c +++ b/fido2/ctap.c @@ -1216,7 +1216,7 @@ int ctap_filter_invalid_credentials(CTAP_getAssertion * GA) if (memcmp(rk.id.rpIdHash, rpIdHash, 32) == 0) { printf1(TAG_GA, "RK %d is a rpId match!\r\n", i); - if (count == ALLOW_LIST_MAX_SIZE-1) + if (count >= ALLOW_LIST_MAX_SIZE) { printf2(TAG_ERR, "not enough ram allocated for matching RK's (%d). Skipping.\r\n", count); break;