[gnome-software/wip/temp/ubuntu-xenial-rebased: 288/326] NULL terminate dpkg-deb argv
- From: Iain Lane <iainl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/temp/ubuntu-xenial-rebased: 288/326] NULL terminate dpkg-deb argv
- Date: Fri, 29 Apr 2016 10:11:34 +0000 (UTC)
commit ac1ca6635ae9283c8694ce16bd106b257a951f81
Author: William Hua <william hua canonical com>
Date: Mon Apr 25 04:21:15 2016 -0400
NULL terminate dpkg-deb argv
src/plugins/gs-plugin-dpkg.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-dpkg.c b/src/plugins/gs-plugin-dpkg.c
index 125539b..e3eb2da 100644
--- a/src/plugins/gs-plugin-dpkg.c
+++ b/src/plugins/gs-plugin-dpkg.c
@@ -78,7 +78,7 @@ gs_plugin_filename_to_app (GsPlugin *plugin,
return TRUE;
/* exec sync */
- argv = g_new0 (gchar *, 4);
+ argv = g_new0 (gchar *, 5);
argv[0] = g_strdup (DPKG_DEB_BINARY);
argv[1] = g_strdup ("--showformat=${Package}\\n"
"${Version}\\n"
@@ -87,6 +87,7 @@ gs_plugin_filename_to_app (GsPlugin *plugin,
"${Description}");
argv[2] = g_strdup ("-W");
argv[3] = g_strdup (filename);
+ argv[4] = NULL;
if (!g_spawn_sync (NULL, argv, NULL,
G_SPAWN_SEARCH_PATH | G_SPAWN_STDERR_TO_DEV_NULL,
NULL, NULL, &output, NULL, NULL, error))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]