gpg: Fix AEAD preference list overflow

* g10/getkey.c (fixup_uidnode): Increase size of prefs array.
--

GnuPG-bug-id: 5050
Fixes-commit: ab7a0b0702
which introduced a feature to show the AEAD preferences of keys
created with rfc4880bis capable software (e.g. GnuPG 2.3-beta).
The same code in 2.3 is correct, though.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2020-09-03 15:22:00 +02:00
parent 0383146653
commit aeb8272ca8
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 1 additions and 1 deletions

View File

@ -2481,7 +2481,7 @@ fixup_uidnode (KBNODE uidnode, KBNODE signode, u32 keycreated)
nzip = p ? n : 0;
if (uid->prefs)
xfree (uid->prefs);
n = nsym + nhash + nzip;
n = nsym + naead + nhash + nzip;
if (!n)
uid->prefs = NULL;
else