summaryrefslogtreecommitdiffstats
path: root/g10/export.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2017-12-13 10:52:34 +0100
committerWerner Koch <wk@gnupg.org>2017-12-13 10:52:34 +0100
commitcd26c5482b10bee7658959ae913f2ddb83190587 (patch)
treef57eb9c03f12f92eb15fd41485e04c5dc680993b /g10/export.c
parentgpg: Remove some xmallocs. (diff)
downloadgnupg2-cd26c5482b10bee7658959ae913f2ddb83190587.tar.xz
gnupg2-cd26c5482b10bee7658959ae913f2ddb83190587.zip
gpg: Return an error from hexfingerprint on malloc error.
* g10/keyid.c (hexfingerprint): Return NULL on malloc failure. Chnage all callers. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/export.c')
-rw-r--r--g10/export.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/g10/export.c b/g10/export.c
index 8f6371b30..c538dc1f1 100644
--- a/g10/export.c
+++ b/g10/export.c
@@ -1430,6 +1430,11 @@ print_pka_or_dane_records (iobuf_t out, kbnode_t keyblock, PKT_public_key *pk,
char *hexfpr;
hexfpr = hexfingerprint (pk, NULL, 0);
+ if (!hexfpr)
+ {
+ err = gpg_error_from_syserror ();
+ goto leave;
+ }
hexdata = bin2hex (data, datalen, NULL);
if (!hexdata)
{