resolved: use dns_answer_size() where appropriate to handle NULL DnsAnswer
authorLennart Poettering <lennart@poettering.net>
Thu, 7 Jan 2016 11:47:07 +0000 (12:47 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 11 Jan 2016 18:39:58 +0000 (19:39 +0100)
src/resolve/resolved-dns-dnssec.c

index f2b4beb..e71939d 100644 (file)
@@ -542,7 +542,7 @@ int dnssec_verify_rrset(
         }
 
         /* Collect all relevant RRs in a single array, so that we can look at the RRset */
-        list = newa(DnsResourceRecord *, a->n_rrs);
+        list = newa(DnsResourceRecord *, dns_answer_size(a));
 
         DNS_ANSWER_FOREACH(rr, a) {
                 r = dns_resource_key_equal(key, rr->key);