scd: Fix possibly inhibited checkpin of the admin pin.
authorWerner Koch <wk@gnupg.org>
Fri, 12 Dec 2014 19:08:45 +0000 (20:08 +0100)
committerNIIBE Yutaka <gniibe@fsij.org>
Fri, 9 Jan 2015 00:07:28 +0000 (09:07 +0900)
* scd/app-openpgp.c (do_check_pin): Do not check a byte of a released
buffer.

Signed-off-by: Werner Koch <wk@gnupg.org>
scd/app-openpgp.c

index bd96ed0..fc69fdb 100644 (file)
@@ -3711,7 +3711,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"));