rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / network / avahi / patches / 26-CVE-2023-1981.patch
blob9f9fcac668c4a31a4c9fb7c1bac2011d8a995480
1 Patch taken from
2 https://github.com/lathiat/avahi/commit/a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f
3 and modified to apply with the current version 0.7.
5 --- avahi-0.7/avahi-daemon/dbus-protocol.c.orig 2023-04-23 23:24:34.611460338 -0700
6 +++ avahi-0.7/avahi-daemon/dbus-protocol.c 2023-04-23 23:28:32.220077728 -0700
7 @@ -391,11 +391,14 @@
10 t = avahi_alternative_host_name(n);
11 - avahi_dbus_respond_string(c, m, t);
12 - avahi_free(t);
13 + if (t) {
14 + avahi_dbus_respond_string(c, m, t);
15 + avahi_free(t);
16 + return DBUS_HANDLER_RESULT_HANDLED;
17 + } else {
18 + return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Hostname not found");
19 + }
21 - return DBUS_HANDLER_RESULT_HANDLED;
23 } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "GetAlternativeServiceName")) {
24 char *n, *t;
26 @@ -405,11 +408,14 @@
29 t = avahi_alternative_service_name(n);
30 - avahi_dbus_respond_string(c, m, t);
31 - avahi_free(t);
32 + if (t) {
33 + avahi_dbus_respond_string(c, m, t);
34 + avahi_free(t);
35 + return DBUS_HANDLER_RESULT_HANDLED;
36 + } else {
37 + return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Service not found");
38 + }
40 - return DBUS_HANDLER_RESULT_HANDLED;
42 } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "EntryGroupNew")) {
43 Client *client;
44 EntryGroupInfo *i;