systemd/0058-resolved-bugfix-of-null-pointer-p-question-dereferen.patch
Zbigniew Jędrzejewski-Szmek d743bb5bcc Revert "Build with meson"
This reverts commits 3fb4a15096
and 0e8350ca14.

Either building with meson or other upstream changes was causing
issues with booting, and I didn't have time to debug this properly.
2017-06-27 13:42:28 -04:00

27 lines
918 B
Diff

From cb58341c27c8a28f43245e2846360226a0605b14 Mon Sep 17 00:00:00 2001
From: Evgeny Vereshchagin <evvers@ya.ru>
Date: Wed, 24 May 2017 08:56:48 +0300
Subject: [PATCH] resolved: bugfix of null pointer p->question dereferencing
(#6020)
See https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1621396
(cherry picked from commit a924f43f30f9c4acaf70618dd2a055f8b0f166be)
---
src/resolve/resolved-dns-packet.c | 3 +++
1 file changed, 3 insertions(+)
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;