Resolves: #2054939 (Crash on a PackageKit app install)

This commit is contained in:
Milan Crha 2022-02-16 17:41:29 +01:00
parent f6af9a7826
commit 1fac831a31
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,28 @@
From 73d1c9fd58d2fdf2c2d84e70cce678390679baa9 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Wed, 16 Feb 2022 15:01:46 +0100
Subject: [PATCH] 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++) {
--
GitLab

View File

@ -13,7 +13,7 @@
Name: gnome-software Name: gnome-software
Version: 42~beta Version: 42~beta
Release: 1%{?dist} Release: 2%{?dist}
Summary: A software center for GNOME Summary: A software center for GNOME
License: GPLv2+ License: GPLv2+
@ -21,6 +21,7 @@ URL: https://wiki.gnome.org/Apps/Software
Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarball_version}.tar.xz Source0: https://download.gnome.org/sources/gnome-software/42/%{name}-%{tarball_version}.tar.xz
Patch01: 0001-crash-with-broken-theme.patch Patch01: 0001-crash-with-broken-theme.patch
Patch02: 0002-packagekit-crash-on-app-install.patch
BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: appstream-devel >= %{appstream_version}
BuildRequires: gcc BuildRequires: gcc
@ -197,6 +198,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%{_datadir}/gtk-doc/html/gnome-software %{_datadir}/gtk-doc/html/gnome-software
%changelog %changelog
* Wed Feb 16 2022 Milan Crha <mcrha@redhat.com> - 42.beta-2
- Resolves: #2054939 (Crash on a PackageKit app install)
* Fri Feb 11 2022 Milan Crha <mcrha@redhat.com> - 42.beta-1 * Fri Feb 11 2022 Milan Crha <mcrha@redhat.com> - 42.beta-1
- Update to 42.beta - Update to 42.beta