]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved: bugfix of null pointer p->question dereferencing (#6020)
authorEvgeny Vereshchagin <evvers@ya.ru>
Wed, 24 May 2017 05:56:48 +0000 (08:56 +0300)
committerGitHub <noreply@github.com>
Wed, 24 May 2017 05:56:48 +0000 (08:56 +0300)
See https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1621396

src/resolve/resolved-dns-packet.c

index 652970284ed666ba09ce75f8e2aa50c0da63557f..240ee448f4e9382206ed88575b87192547c24300 100644 (file)
@@ -2269,6 +2269,9 @@ int dns_packet_is_reply_for(DnsPacket *p, const DnsResourceKey *key) {
         if (r < 0)
                 return r;
 
+        if (!p->question)
+                return 0;
+
         if (p->question->n_keys != 1)
                 return 0;