From 05afcd706ea0550cac41ead989cae929d116288c Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Thu, 30 Mar 2023 00:37:31 +0200 Subject: [PATCH] Fix OATH calculation result when called multiple times. Signed-off-by: Pol Henarejos --- src/fido/oath.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/fido/oath.c b/src/fido/oath.c index 901df2b..19bd8be 100644 --- a/src/fido/oath.c +++ b/src/fido/oath.c @@ -336,6 +336,7 @@ int calculate_oath(uint8_t truncate, if (r != 0) { return CCID_EXEC_ERROR; } + res_APDU_size = 0; if (truncate == 0x01) { res_APDU[res_APDU_size++] = 4 + 1; res_APDU[res_APDU_size++] = key[1];