aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2024-05-16 01:28:38 +0000
committerNIIBE Yutaka <[email protected]>2024-05-16 01:28:38 +0000
commitbb57c808b2ad2d064ef9dd5a69ca94f6e6f7a763 (patch)
treee37c8a1212e4bc27593250b991b96dcf0188e146
parentgpg,gpgsm: Remove compatibility_flags allow-ecc-encr and vsd-allow-encr. (diff)
downloadgnupg-bb57c808b2ad2d064ef9dd5a69ca94f6e6f7a763.tar.gz
gnupg-bb57c808b2ad2d064ef9dd5a69ca94f6e6f7a763.zip
scd:openpgp: Fix PIN pin2hash_if_kdf.
* scd/app-openpgp.c (pin2hash_if_kdf): DEK had been changed to pointer to allocated memory, so, we need to use DEKLEN for the length. -- GnuPG-bug-id: 7121 Fixes-commit: 20e85585ed20af67ce68e637ea5c3637615ba2e9 Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--scd/app-openpgp.c2
1 files changed, 1 insertions, 1 deletions
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;