diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index 0ce09e1a0..8527c4734 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -2534,7 +2534,7 @@ pin2hash_if_kdf (app_t app, int chvno, const char *pin, err = gcry_kdf_derive (pin, pinlen, GCRY_KDF_ITERSALTED_S2K, DIGEST_ALGO_SHA256, salt, 8, - s2k_count, sizeof (dek), dek); + s2k_count, deklen, dek); if (!err) { *r_pinlen = deklen;