From: Thomas Hindoe Paaboel Andersen <pho...@gmail.com> In dns_scope_make_reply_packet the structs q, answer, and soa can be null. We should check for null before reading their fields. --- src/resolve/resolved-dns-scope.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c index 9567056..3c2f6e6 100644 --- a/src/resolve/resolved-dns-scope.c +++ b/src/resolve/resolved-dns-scope.c @@ -412,7 +412,9 @@ static int dns_scope_make_reply_packet( assert(s); - if (q->n_keys <= 0 && answer->n_rrs <= 0 && soa->n_rrs <= 0) + if ((!q || q->n_keys <= 0) + && (!answer || answer->n_rrs <= 0) + && (!soa || soa->n_rrs <= 0)) return -EINVAL; r = dns_packet_new(&p, s->protocol, 0); -- 1.9.3 _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel