[gnome-packagekit/gnome-2-30] Fix crash in gpk-dbus-service when looking for printer drivers



commit 249fe7affd7bb5a8b593a6f9f75e3aa79de0ff4f
Author: Vincent Untz <vuntz gnome org>
Date:   Thu Jun 17 16:24:08 2010 +0200

    Fix crash in gpk-dbus-service when looking for printer drivers
    
    We were creating a gchar ** variable that is supposed to end with NULL,
    except that we forgot to add a NULL at the end.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=621892

 src/gpk-dbus-task.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/gpk-dbus-task.c b/src/gpk-dbus-task.c
index 014dfef..e909d46 100644
--- a/src/gpk-dbus-task.c
+++ b/src/gpk-dbus-task.c
@@ -2627,7 +2627,8 @@ gpk_dbus_task_install_printer_drivers (GpkDbusTask *dtask, gchar **device_ids, G
 		goto out;
 	}
 
-	tags = g_renew (gchar *, tags, n_tags);
+	tags = g_renew (gchar *, tags, n_tags + 1);
+	tags[n_tags] = NULL;
 
 	/* get driver packages */
 	pk_client_what_provides_async (PK_CLIENT(dtask->priv->task),



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