If the handle given in ActionInvoked is not found in the local table of handles, return from the ActionInvoked handler. Otherwise, every program using libnotify will crash when a notification is clicked. Oops!

This commit is contained in:
Christian Hammond 2005-07-27 07:22:32 +00:00
parent 057751cc69
commit 7fdc36d00e
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,11 @@
Wed Jul 27 00:18:16 PDT 2005 Christian Hammond <chipx86@chipx86.com>
* libnotify/notify.c:
- If the handle given in ActionInvoked is not found in the local
table of handles, return from the ActionInvoked handler. Otherwise,
every program using libnotify will crash when a notification is
clicked. Oops!
Sat Jul 16 02:53:06 PDT 2005 Christian Hammond <chipx86@gnupdate.org>
* libnotify/notify.c:

View File

@ -204,6 +204,9 @@ _filter_func(DBusConnection *dbus_conn, DBusMessage *message, void *user_data)
handle = g_hash_table_lookup(_handles, &id);
if (handle == NULL)
goto exit;
if (handle->actions_table == NULL)
{
print_error("An action (%d) was invoked for a notification (%d) "
@ -230,6 +233,7 @@ _filter_func(DBusConnection *dbus_conn, DBusMessage *message, void *user_data)
else
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
exit:
return DBUS_HANDLER_RESULT_HANDLED;
}