From 7ed54960995ef18d5fff9092b839565080456a40 Mon Sep 17 00:00:00 2001 From: promarbler14 Date: Thu, 8 May 2025 18:46:07 -0400 Subject: daemon: report dbus method invocation as handled on error Returning an error for a dbus method is counted as handling a method invocation. Return true in the handler to avoid a use-after-free. --- src/daemon/daemon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/daemon/daemon.c') diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index ef83301..2064c46 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c @@ -1371,7 +1371,7 @@ static gboolean notify_daemon_notify_handler(NotifyDaemonNotifications *object, if (g_hash_table_size (daemon->notification_hash) > MAX_NOTIFICATIONS) { g_dbus_method_invocation_return_error (invocation, notify_daemon_error_quark(), 1, _("Exceeded maximum number of notifications")); - return FALSE; + return TRUE; } /* Grab the settings */ @@ -1676,7 +1676,7 @@ static gboolean notify_daemon_close_notification_handler(NotifyDaemonNotificatio if (id == 0) { g_dbus_method_invocation_return_error (invocation, notify_daemon_error_quark(), 100, _("%u is not a valid notification ID"), id); - return FALSE; + return TRUE; } else { -- cgit v1.2.1