summaryrefslogtreecommitdiffstats
path: root/g10/keygen.c
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2021-09-13 19:04:56 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2021-11-12 07:36:19 +0100
commitd24c5df52b55e86b49b48f153a1ada5a5081eda5 (patch)
treee215be6127d358c99ab461e1678a51d5446b0f8e /g10/keygen.c
parentagent: Avoid uninitialized buffer. (diff)
downloadgnupg2-d24c5df52b55e86b49b48f153a1ada5a5081eda5.tar.xz
gnupg2-d24c5df52b55e86b49b48f153a1ada5a5081eda5.zip
gpg: Avoid uninitialized revkey.fprlen.
* g10/keygen.c (parse_revocation_key): Store the fingerprint length in created structure. -- GnuPG-bug-id: 5393 Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Diffstat (limited to 'g10/keygen.c')
-rw-r--r--g10/keygen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/g10/keygen.c b/g10/keygen.c
index cb6487ea3..7f15027a2 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -4003,6 +4003,8 @@ parse_revocation_key (const char *fname,
if (i != 20 && i != 32)
goto fail;
+ revkey.fprlen = i;
+
/* skip to the tag */
while(*pn && *pn!='s' && *pn!='S')
pn++;