summaryrefslogtreecommitdiff
path: root/util/data/msgreply.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/data/msgreply.c')
-rw-r--r--util/data/msgreply.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/data/msgreply.c b/util/data/msgreply.c
index 2ce898d7f031..6d80cce4cb50 100644
--- a/util/data/msgreply.c
+++ b/util/data/msgreply.c
@@ -840,7 +840,9 @@ log_reply_info(enum verbosity_value v, struct query_info *qinf,
{
log_info("%s - - - %s - - - ", clientip_buf, rcode_buf);
} else {
- dname_str(qinf->qname, qname_buf);
+ if(qinf->qname)
+ dname_str(qinf->qname, qname_buf);
+ else snprintf(qname_buf, sizeof(qname_buf), "null");
pktlen = sldns_buffer_limit(rmsg);
sldns_wire2str_type_buf(qinf->qtype, type_buf, sizeof(type_buf));
sldns_wire2str_class_buf(qinf->qclass, class_buf, sizeof(class_buf));