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 <wk@gnupg.org>
This commit is contained in:
Werner Koch 2014-12-12 20:08:45 +01:00
parent f3f9f9b284
commit 68b4e7c9e4
1 changed files with 1 additions and 1 deletions

View File

@ -4286,7 +4286,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"));