aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2024-09-11 04:51:16 +0000
committerWerner Koch <[email protected]>2024-09-19 11:18:56 +0000
commita17584d000cfae787fc187ed19c0d9cb94f3ca48 (patch)
treeba9ea46f8404d944fc71791b9edcadfce26351f5
parentgpg: Improve detection of input data read errors. (diff)
downloadgnupg-a17584d000cfae787fc187ed19c0d9cb94f3ca48.tar.gz
gnupg-a17584d000cfae787fc187ed19c0d9cb94f3ca48.zip
gpg: Fix getting key by IPGP.
* g10/call-dirmngr.c (gpg_dirmngr_dns_cert): Check if DATA for key. -- GnuPG-bug-id: 7288 Reported-by: Wilfried Teiken Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--g10/call-dirmngr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/g10/call-dirmngr.c b/g10/call-dirmngr.c
index c47bf0928..e5295d4bd 100644
--- a/g10/call-dirmngr.c
+++ b/g10/call-dirmngr.c
@@ -1197,7 +1197,8 @@ gpg_dirmngr_dns_cert (ctrl_t ctrl, const char *name, const char *certtype,
if (err)
goto leave;
- if (r_key)
+ /* Data line returned by dirmngr may be nothing. Check if any. */
+ if (es_ftell (parm.memfp) != 0 && r_key)
{
es_rewind (parm.memfp);
*r_key = parm.memfp;