diff options
author | Christian Hammond <chipx86@chipx86.com> | 2005-07-27 07:22:32 +0000 |
---|---|---|
committer | Christian Hammond <chipx86@chipx86.com> | 2005-07-27 07:22:32 +0000 |
commit | 7fdc36d00ef56788fec4959783250d3fd0b12449 (patch) | |
tree | fc300ce7c60b970400f7d96848fa4310b118e86c | |
parent | 057751cc69342cc5e1e3837bf3e9267da63e9163 (diff) | |
download | libnotify-7fdc36d00ef56788fec4959783250d3fd0b12449.tar.gz |
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!
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | libnotify/notify.c | 4 |
2 files changed, 12 insertions, 0 deletions
@@ -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: diff --git a/libnotify/notify.c b/libnotify/notify.c index 59bfef8..920af35 100644 --- a/libnotify/notify.c +++ b/libnotify/notify.c @@ -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; } |