mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
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 <arnaud.fontaine@ssi.gouv.fr> Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
70a8584ec4
commit
25428be521
@ -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 ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user