[zenity] Bug 733870 - Segmentation fault on zenity --notification



commit 9d03f0d006ad3080d6bbb91bff6ea5e71c7c98a2
Author: Arx Cruz <arxcruz gnome org>
Date:   Fri Aug 29 14:31:57 2014 +0200

    Bug 733870 - Segmentation fault on zenity --notification
    
    This fix a problem when user calls --hint=urgency without
    specify a :NOTIFY_URGENCY

 src/notification.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/notification.c b/src/notification.c
index 3a55202..d563157 100644
--- a/src/notification.c
+++ b/src/notification.c
@@ -139,10 +139,14 @@ zenity_notification_set_hint(gpointer key, gpointer value, gpointer user_data)
   } else if ((g_ascii_strcasecmp ("x", hint_name) == 0)
              || (g_ascii_strcasecmp ("y", hint_name) == 0)) {
     /* int hints */
+       if (string_value == NULL)
+         string_value = "";
     int_value = (gint32) g_ascii_strtoll (string_value, NULL, 0);
     hint_value = g_variant_new_int32 (int_value);
   } else if ((g_ascii_strcasecmp ("urgency", hint_name) == 0)) {
     /* byte hints */
+       if (string_value == NULL)
+         string_value = "";
     byte_value = (guchar) g_ascii_strtoll (string_value, NULL, 0);
     hint_value = g_variant_new_byte (byte_value);
   } else {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]