[Pkg-gnupg-commit] [gnupg2] 63/132: dirmngr: Fix possible null reference.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed May 17 03:07:42 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit 7ae1857c90ab43ad9e31f0fb6dbd37f25cc37278
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Wed Apr 12 15:58:11 2017 +0900
dirmngr: Fix possible null reference.
* dirmngr/dns.c (dns_error_t dns_trace_fput): Check NULL.
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
---
dirmngr/dns.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dirmngr/dns.c b/dirmngr/dns.c
index 39d3295..9bba329 100644
--- a/dirmngr/dns.c
+++ b/dirmngr/dns.c
@@ -4606,8 +4606,9 @@ dns_error_t dns_trace_fput(const struct dns_trace_event *te, const void *data, s
if (fwrite(&tmp, 1, headsize, fp) < headsize)
return errno;
- if (fwrite(data, 1, datasize, fp) < datasize)
- return errno;
+ if (data)
+ if (fwrite(data, 1, datasize, fp) < datasize)
+ return errno;
if (fflush(fp))
return errno;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list