[gnome-software/gnome-3-22] Fixes a potential crash when parsing AppStream files
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-22] Fixes a potential crash when parsing AppStream files
- Date: Tue, 6 Dec 2016 11:55:38 +0000 (UTC)
commit cd33d454742caba8bb4a9d308df7c3231fbdf674
Author: Richard Hughes <richard hughsie com>
Date: Thu Dec 1 18:38:38 2016 +0000
Fixes a potential crash when parsing AppStream files
Resolves:
https://retrace.fedoraproject.org/faf/problems/bthash/?bth=0a1f2a9d4b0139665374680be64481ee48a1707a
src/plugins/gs-appstream.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/gs-appstream.c b/src/plugins/gs-appstream.c
index 1197f47..0776c5f 100644
--- a/src/plugins/gs-appstream.c
+++ b/src/plugins/gs-appstream.c
@@ -628,9 +628,11 @@ gs_appstream_refine_app (GsPlugin *plugin,
if (as_app_get_origin (item) != NULL &&
gs_app_get_origin (app) == NULL ) {
tmp = as_app_get_unique_id (item);
- if (g_str_has_prefix (tmp, "user/flatpak/") ||
- g_str_has_prefix (tmp, "system/flatpak/"))
- gs_app_set_origin (app, as_app_get_origin (item));
+ if (tmp != NULL) {
+ if (g_str_has_prefix (tmp, "user/flatpak/") ||
+ g_str_has_prefix (tmp, "system/flatpak/"))
+ gs_app_set_origin (app, as_app_get_origin (item));
+ }
}
/* set description */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]