Fix infinite loop when invoking SetFilterA dbus method more than once.

Also applies to SetFilterAAAA.

Thanks to Clayton Craft for spotting the issue.
This commit is contained in:
Simon Kelley
2024-02-19 23:21:58 +00:00
parent de6f914654
commit 89aad01468

View File

@@ -833,6 +833,7 @@ DBusHandlerResult message_handler(DBusConnection *connection,
if (!done) if (!done)
{ {
done = 1;
list.next = daemon->filter_rr; list.next = daemon->filter_rr;
daemon->filter_rr = &list; daemon->filter_rr = &list;
} }
@@ -844,6 +845,7 @@ DBusHandlerResult message_handler(DBusConnection *connection,
if (!done) if (!done)
{ {
done = 1;
list.next = daemon->filter_rr; list.next = daemon->filter_rr;
daemon->filter_rr = &list; daemon->filter_rr = &list;
} }