|
Zbigniew Jędrzejewski-Szmek |
d743bb |
From cb58341c27c8a28f43245e2846360226a0605b14 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
From: Evgeny Vereshchagin <evvers@ya.ru>
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
Date: Wed, 24 May 2017 08:56:48 +0300
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
Subject: [PATCH] resolved: bugfix of null pointer p->question dereferencing
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
(#6020)
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
See https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1621396
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
(cherry picked from commit a924f43f30f9c4acaf70618dd2a055f8b0f166be)
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
---
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
src/resolve/resolved-dns-packet.c | 3 +++
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
1 file changed, 3 insertions(+)
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
index 652970284e..240ee448f4 100644
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
--- a/src/resolve/resolved-dns-packet.c
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
+++ b/src/resolve/resolved-dns-packet.c
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
@@ -2269,6 +2269,9 @@ int dns_packet_is_reply_for(DnsPacket *p, const DnsResourceKey *key) {
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
if (r < 0)
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
return r;
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
+ if (!p->question)
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
+ return 0;
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
+
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
if (p->question->n_keys != 1)
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
return 0;
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
|