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