diff options
| author | Werner Koch <[email protected]> | 2019-07-12 11:57:00 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2019-07-12 11:57:00 +0000 |
| commit | a5118b19c182b558635a6a11ef55b6b8a18c04e9 (patch) | |
| tree | 16f59401d004b086e1a00c7dad8e4a7523af2fae /g10/parse-packet.c | |
| parent | Merge branch 'master' into switch-to-gpgk (diff) | |
| parent | scd: Remove useless GNUPG_SCD_MAIN_HEADER macro. (diff) | |
| download | gnupg-a5118b19c182b558635a6a11ef55b6b8a18c04e9.tar.gz gnupg-a5118b19c182b558635a6a11ef55b6b8a18c04e9.zip | |
Merge branch 'master' into switch-to-gpgk
Diffstat (limited to 'g10/parse-packet.c')
| -rw-r--r-- | g10/parse-packet.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/g10/parse-packet.c b/g10/parse-packet.c index 5b4b1c900..ab82d475a 100644 --- a/g10/parse-packet.c +++ b/g10/parse-packet.c @@ -35,14 +35,9 @@ #include "main.h" #include "../common/i18n.h" #include "../common/host2net.h" +#include "../common/mbox-util.h" -/* Maximum length of packets to avoid excessive memory allocation. */ -#define MAX_KEY_PACKET_LENGTH (256 * 1024) -#define MAX_UID_PACKET_LENGTH ( 2 * 1024) -#define MAX_COMMENT_PACKET_LENGTH ( 64 * 1024) -#define MAX_ATTR_PACKET_LENGTH ( 16 * 1024*1024) - static int mpi_print_mode; static int list_mode; static estream_t listfp; @@ -2118,12 +2113,20 @@ parse_signature (IOBUF inp, int pkttype, unsigned long pktlen, p = parse_sig_subpkt (sig->hashed, SIGSUBPKT_SIGNERS_UID, &len); if (p && len) { + char *mbox; + sig->signers_uid = try_make_printable_string (p, len, 0); if (!sig->signers_uid) { rc = gpg_error_from_syserror (); goto leave; } + mbox = mailbox_from_userid (sig->signers_uid, 0); + if (mbox) + { + xfree (sig->signers_uid); + sig->signers_uid = mbox; + } } p = parse_sig_subpkt (sig->hashed, SIGSUBPKT_NOTATION, NULL); |
