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



commit 73d1c9fd58d2fdf2c2d84e70cce678390679baa9
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]