diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2017-05-24 08:56:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-24 08:56:48 +0300 |
commit | a924f43f30f9c4acaf70618dd2a055f8b0f166be (patch) | |
tree | dcee3644570600886874d66d74b98d1906fc05a7 /src/resolve | |
parent | d82c4b9a7be6dc8f340930b5e80968d0e48c4c57 (diff) | |
download | systemd-a924f43f30f9c4acaf70618dd2a055f8b0f166be.tar.gz |
resolved: bugfix of null pointer p->question dereferencing (#6020)
See https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1621396
Diffstat (limited to 'src/resolve')
-rw-r--r-- | src/resolve/resolved-dns-packet.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c index 652970284e..240ee448f4 100644 --- a/src/resolve/resolved-dns-packet.c +++ b/src/resolve/resolved-dns-packet.c @@ -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; |