[gnome-software/1648-crash-on-packagekit-app-install: 9/10] PackageKit: Fix a crash on app install




commit dcdf16ba5d799fb6c4649dab8104b417c969f072
Author: Milan Crha <mcrha redhat com>
Date:   Wed Feb 16 15:01:46 2022 +0100

    PackageKit: Fix a crash on app install
    
    The array should be NULL-terminated, thus add the NULL at the end.
    
    Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1648

 plugins/packagekit/gs-plugin-packagekit.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/plugins/packagekit/gs-plugin-packagekit.c b/plugins/packagekit/gs-plugin-packagekit.c
index 1ad913af5..56ddb1ccc 100644
--- a/plugins/packagekit/gs-plugin-packagekit.c
+++ b/plugins/packagekit/gs-plugin-packagekit.c
@@ -612,6 +612,8 @@ gs_plugin_app_install (GsPlugin *plugin,
                        return FALSE;
                }
 
+               g_ptr_array_add (array_package_ids, NULL);
+
                gs_app_set_state (app, GS_APP_STATE_INSTALLING);
 
                for (i = 0; i < gs_app_list_length (addons); i++) {


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