From c83e250ef36c28a275de74d96e89898e9f99cb1e Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 12 Dec 2014 20:08:45 +0100 Subject: [PATCH] scd: Fix possibly inhibited checkpin of the admin pin. * scd/app-openpgp.c (do_check_pin): Do not check a byte of a released buffer. Signed-off-by: Werner Koch --- g10/app-openpgp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g10/app-openpgp.c b/g10/app-openpgp.c index b51d4184d..c3b4fae11 100644 --- a/g10/app-openpgp.c +++ b/g10/app-openpgp.c @@ -3497,7 +3497,7 @@ do_check_pin (app_t app, const char *keyidstr, log_info (_("card is permanently locked!\n")); return gpg_error (GPG_ERR_BAD_PIN); } - else if (value[6] < 3) + else if (count < 3) { log_info (_("verification of Admin PIN is currently prohibited " "through this command\n"));