From 1594da7533a7efff07836cc48732c5dd1bc66088 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Tue, 26 Apr 2022 16:39:04 +0200 Subject: [PATCH] Fix with signature counter. Signed-off-by: Pol Henarejos --- src/openpgp/openpgp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openpgp/openpgp.c b/src/openpgp/openpgp.c index 285f841..8d2cdf0 100644 --- a/src/openpgp/openpgp.c +++ b/src/openpgp/openpgp.c @@ -303,7 +303,7 @@ int inc_sig_count() { file_t *ef = search_by_fid(EF_SIG_COUNT, NULL, SPECIFY_ANY); if (!ef || !ef->data) return CCID_ERR_FILE_NOT_FOUND; - p = file_read(ef->data); + p = file_read(ef->data+2); counter = (p[0] << 16) | (p[1] << 8) | p[2]; counter++; uint8_t q[3] = { (counter>>16) & 0xff, (counter>>8) & 0xff, counter&0xff };