Dominique Leuenberger 2020-04-22 18:44:45 +00:00 committed by Git OBS Bridge
commit c3c3fc5f17
8 changed files with 89 additions and 10 deletions

View File

@ -6,7 +6,7 @@
<param name="versionrewrite-pattern">appstream_glib_(\d+)_(\d+)_(\d+)</param>
<param name="versionrewrite-replacement">\1.\2.\3</param>
<param name="changesgenerate">enable</param>
<param name="revision">refs/tags/appstream_glib_0_7_16</param>
<param name="revision">refs/tags/appstream_glib_0_7_17</param>
</service>
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">

View File

@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/hughsie/appstream-glib.git</param>
<param name="changesrevision">230e2da082d9754858330c3e262a9d44f816def1</param></service></servicedata>
<param name="changesrevision">93f614add2377465bc7bd24a9a99c8ae28e2342f</param></service></servicedata>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:daf92fc5d013098cd0e797aae8000552d4fbdf18e6c941b26e50bded2b43f09a
size 4317196

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9cc5c3683d6c5ff92fd9a7a7001c09d1088378422f2dd141169fabc97111315f
size 4333068

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Wed Apr 22 09:30:51 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>
- Add as-glib-PR359.patch: Fix crash with invalid children of <ul>.
-------------------------------------------------------------------
Wed Apr 15 17:12:57 UTC 2020 - dimstar@opensuse.org
- Update to version 0.7.17:
* Support versioning on clang/macOS
* Use ".so" suffix for the plugins on macOS
* Use internal uuid library in macOS
* docs: Fix examples of AsNodeToXmlFlags using an invalid flag.
* Bump minimum glib2 dependency.
* Update Galician translations
* as-app: properly initialize unique_id_mutex
* Use _fullpath() instead of GetFullPathNameA().
* Fix Win32 headers.
* Support ${id}/${locale}.qm in addition to ${id}_${locale}.qm
* as-app: add "icon-theme" as recognised component type
* as-content-rating: Make default values match OARS semantics
-------------------------------------------------------------------
Thu Dec 19 12:07:58 UTC 2019 - dimstar@opensuse.org

View File

@ -1,5 +1,5 @@
name: appstream-glib
version: 0.7.16
mtime: 1569866536
commit: 230e2da082d9754858330c3e262a9d44f816def1
version: 0.7.17
mtime: 1582191077
commit: 93f614add2377465bc7bd24a9a99c8ae28e2342f

View File

@ -1,7 +1,7 @@
#
# spec file for package appstream-glib
#
# Copyright (c) 2019 SUSE LLC
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2014 Dominique Leuenberger, Amsterdam, The Netherlands
#
# All modifications and additions to the file contributed by third parties
@ -18,7 +18,7 @@
Name: appstream-glib
Version: 0.7.16
Version: 0.7.17
Release: 0
Summary: AppStream Abstraction Library
License: LGPL-2.1-or-later AND GPL-2.0-or-later
@ -26,6 +26,8 @@ Group: System/Libraries
URL: http://people.freedesktop.org/~hughsient/appstream-glib/
Source0: %{name}-%{version}.tar.xz
Source1: openSUSE-appstream-process
# PATCH-FIX-UPSTREAM as-glib-PR359.patch dimstar@opensuse.org -- Fix crash with invalid children of <ul>
Patch0: as-glib-PR359.patch
BuildRequires: docbook-xsl-stylesheets
BuildRequires: gcab >= 0.6
BuildRequires: gobject-introspection-devel

55
as-glib-PR359.patch Normal file
View File

@ -0,0 +1,55 @@
From d4bfa8389932029ae85a7bad4a762d69a47fbbb4 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.de>
Date: Wed, 22 Apr 2020 11:22:03 +0200
Subject: [PATCH] Fix crash with invalid children of <ul/>
It segfaulted when building the error message as data_c->name was invalid.
data_c was a valid tag, so only the data_c->tag union member was active.
Fix the crash by calling the proper function instead and add a test case.
---
libappstream-glib/as-node.c | 2 +-
libappstream-glib/as-self-test.c | 11 +++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/libappstream-glib/as-node.c b/libappstream-glib/as-node.c
index 7fd68515..66d582a8 100644
--- a/libappstream-glib/as-node.c
+++ b/libappstream-glib/as-node.c
@@ -1891,7 +1891,7 @@ as_node_get_localized_unwrap_type_li (const AsNode *node,
AS_NODE_ERROR,
AS_NODE_ERROR_INVALID_MARKUP,
"Tag %s in %s invalid",
- data_c->name,
+ as_tag_data_get_name (data_c),
as_tag_data_get_name (data));
return FALSE;
}
diff --git a/libappstream-glib/as-self-test.c b/libappstream-glib/as-self-test.c
index 47ad937f..66166410 100644
--- a/libappstream-glib/as-self-test.c
+++ b/libappstream-glib/as-self-test.c
@@ -2810,6 +2810,7 @@ as_test_node_xml_func (void)
AsNode *n2;
AsNode *root;
GString *xml;
+ GHashTable *hashtable;
/* invalid XML */
root = as_node_from_xml ("<moo>", 0, &error);
@@ -2920,6 +2921,16 @@ as_test_node_xml_func (void)
g_assert_cmpstr (xml->str, ==, "<!-- 1st -->\n<!-- 2nd -->\n<foo/>\n");
g_string_free (xml, TRUE);
as_node_unref (root);
+
+ /* invalid child of ul */
+ root = as_node_from_xml ("<ul><ul></ul></ul>", 0, &error);
+ g_assert_no_error (error);
+ g_assert (root != NULL);
+ hashtable = as_node_get_localized_unwrap (root, &error);
+ g_assert_error (error, AS_NODE_ERROR, AS_NODE_ERROR_INVALID_MARKUP);
+ g_assert_cmpstr (error->message, ==, "Tag ul in ul invalid");
+ g_clear_error (&error);
+ g_assert (hashtable == NULL);
}
static void