Blame SOURCES/0003-dbus-don-t-crash-if-we-can-t-determine-alternative-s.patch

932fb9
From c17ad43fc445ee649f1020378d8464b96ce57102 Mon Sep 17 00:00:00 2001
932fb9
From: Michal Sekletar <msekleta@redhat.com>
932fb9
Date: Mon, 13 Apr 2015 10:06:41 +0200
932fb9
Subject: [PATCH 3/4] dbus: don't crash if we can't determine alternative
932fb9
 {service,host} name
932fb9
932fb9
Resolves: #1003688
932fb9
---
932fb9
 avahi-daemon/dbus-protocol.c | 10 ++++++++++
932fb9
 1 file changed, 10 insertions(+)
932fb9
932fb9
diff --git a/avahi-daemon/dbus-protocol.c b/avahi-daemon/dbus-protocol.c
932fb9
index eb8a662..d7738bd 100644
932fb9
--- a/avahi-daemon/dbus-protocol.c
932fb9
+++ b/avahi-daemon/dbus-protocol.c
932fb9
@@ -391,6 +391,11 @@ static DBusHandlerResult msg_server_impl(DBusConnection *c, DBusMessage *m, AVAH
932fb9
         }
932fb9
 
932fb9
         t = avahi_alternative_host_name(n);
932fb9
+        if (!t) {
932fb9
+            avahi_log_warn("Failed to determine alternative host name");
932fb9
+            goto fail;
932fb9
+        }
932fb9
+
932fb9
         avahi_dbus_respond_string(c, m, t);
932fb9
         avahi_free(t);
932fb9
 
932fb9
@@ -405,6 +410,11 @@ static DBusHandlerResult msg_server_impl(DBusConnection *c, DBusMessage *m, AVAH
932fb9
         }
932fb9
 
932fb9
         t = avahi_alternative_service_name(n);
932fb9
+        if (!t) {
932fb9
+            avahi_log_warn("Failed to determine alternative service name");
932fb9
+            goto fail;
932fb9
+        }
932fb9
+
932fb9
         avahi_dbus_respond_string(c, m, t);
932fb9
         avahi_free(t);
932fb9
 
932fb9
-- 
932fb9
2.3.4
932fb9