aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 ed2cf9dc2..12469d60a 100644
--- a/g10/call-dirmngr.c
+++ b/g10/call-dirmngr.c
@@ -1198,7 +1198,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;