diff options
author | NIIBE Yutaka <[email protected]> | 2016-10-17 03:02:28 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2016-10-17 03:02:28 +0000 |
commit | 25428be52168fa9c581b7f11c95a5c63b25343b7 (patch) | |
tree | 2fc6239c9b1026e9767dfec4bfac631bb6be9887 | |
parent | gpgconf: Fix for --homedir. (diff) | |
download | gnupg-25428be52168fa9c581b7f11c95a5c63b25343b7.tar.gz gnupg-25428be52168fa9c581b7f11c95a5c63b25343b7.zip |
scd: Fix keytocard for ECC.
* scd/app-openpgp.c (build_ecc_privkey_template): Size can be greater
than 128 when it comes with public key for curve of larger field.
--
Reported-by: Arnaud Fontaine <[email protected]>
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | scd/app-openpgp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index 563a045bd..ef335fee3 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -2689,6 +2689,8 @@ build_ecc_privkey_template (app_t app, int keyno, + privkey_len + suffix_len + datalen); + if (exthdr_len + privkey_len + suffix_len + datalen >= 128) + template_size++; tp = template = xtrymalloc_secure (template_size); if (!template) return gpg_error_from_syserror (); |