summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-12-27 14:22:22 -0800
committerStefano Karapetsas <[email protected]>2013-12-27 14:22:22 -0800
commit0280831e27ff5dc2d7c7473cd3bf9041f805299e (patch)
treefd1c38be2e239d02658bfd77a8d2c1463f685766
parent9f4203a7c5d99fe66aa98d0ea3d23132bd5142cd (diff)
parentb0a1739abb00bb6c62811c5c0f1e766d0ef13140 (diff)
downloadmate-notification-daemon-0280831e27ff5dc2d7c7473cd3bf9041f805299e.tar.bz2
mate-notification-daemon-0280831e27ff5dc2d7c7473cd3bf9041f805299e.tar.xz
Merge pull request #26 from pkerling/master
Check value type of notification hint 'urgency' before dereferencing
-rw-r--r--src/themes/coco/coco-theme.c2
-rw-r--r--src/themes/nodoka/nodoka-theme.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/themes/coco/coco-theme.c b/src/themes/coco/coco-theme.c
index 71b62fb..2c257e7 100644
--- a/src/themes/coco/coco-theme.c
+++ b/src/themes/coco/coco-theme.c
@@ -602,7 +602,7 @@ set_notification_hints(GtkWindow *nw, GHashTable *hints)
value = (GValue *)g_hash_table_lookup(hints, "urgency");
- if (value != NULL)
+ if (value != NULL && G_VALUE_HOLDS_UCHAR(value))
{
windata->urgency = g_value_get_uchar(value);
diff --git a/src/themes/nodoka/nodoka-theme.c b/src/themes/nodoka/nodoka-theme.c
index 0998d0b..9ec831f 100644
--- a/src/themes/nodoka/nodoka-theme.c
+++ b/src/themes/nodoka/nodoka-theme.c
@@ -1005,7 +1005,7 @@ set_notification_hints(GtkWindow *nw, GHashTable *hints)
value = (GValue *)g_hash_table_lookup(hints, "urgency");
- if (value != NULL)
+ if (value != NULL && G_VALUE_HOLDS_UCHAR(value))
{
windata->urgency = g_value_get_uchar(value);