From 391131bb5e4ae91aed9d353d6604aaf3ef7d24e8 Mon Sep 17 00:00:00 2001 From: Peter Marschall Date: Sat, 22 Dec 2018 23:01:10 +0100 Subject: [PATCH] OpenPGP: use "hist_bytes" DO 5F52 as args to pgp_parse_hist_bytes() Fix glitch that crept in during re-factoring. This should unbreak Yubikeys. --- src/libopensc/card-openpgp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libopensc/card-openpgp.c b/src/libopensc/card-openpgp.c index fd8e85d0..603386c6 100644 --- a/src/libopensc/card-openpgp.c +++ b/src/libopensc/card-openpgp.c @@ -720,8 +720,8 @@ pgp_get_card_features(sc_card_t *card) if ((pgp_get_blob(card, priv->mf, 0x5f52, &blob) >= 0) && (blob->data != NULL) && (blob->data[0] == 0x00)) { - if (hist_bytes_len > 4) { - pgp_parse_hist_bytes(card, hist_bytes+1, hist_bytes_len-4); + if (blob->len > 4) { + pgp_parse_hist_bytes(card, blob->data+1, blob->len-4); } /* get card status from historical bytes status indicator */