[gnome-terminal/gnome-2-32] Don't crash when receiving bogus data in the dbus call



commit 6d5a8d9359de5e640fb89489af7025b851850fa1
Author: Christian Persch <chpe gnome org>
Date:   Sat Nov 6 13:10:30 2010 +0100

    Don't crash when receiving bogus data in the dbus call
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=650276 .

 src/terminal.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/terminal.c b/src/terminal.c
index 4925359..202b850 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -80,7 +80,9 @@ ay_to_strv (GVariant *variant,
 
   data = g_variant_get_fixed_array (variant, &data_len, sizeof (char));
   if (data_len == 0 || data_len > G_MAXSSIZE) {
-    *argc = 0;
+    if (argc)
+      *argc = 0;
+
     return NULL;
   }
 



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