aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2020-09-14 15:59:39 +0200
committerRasmus Thomsen <oss@cogitri.dev>2020-09-14 15:59:39 +0200
commit8a7c10067980cda9c842245f83dc0acbe9a289f1 (patch)
tree755255ccee7800e6d68cbb61a477466fc5054c7f
parentef80912a88764f5e7b6e4abfbff7b31d63b38054 (diff)
downloadaports-8a7c10067980cda9c842245f83dc0acbe9a289f1.tar.gz
aports-8a7c10067980cda9c842245f83dc0acbe9a289f1.tar.bz2
aports-8a7c10067980cda9c842245f83dc0acbe9a289f1.tar.xz
community/appstream: add upstream patch to fix SEGFAULTs in appstream-generator
-rw-r--r--community/appstream/1109c847b272be6b65ec3d2a4c58e91f0be369fc.patch33
-rw-r--r--community/appstream/APKBUILD8
2 files changed, 38 insertions, 3 deletions
diff --git a/community/appstream/1109c847b272be6b65ec3d2a4c58e91f0be369fc.patch b/community/appstream/1109c847b272be6b65ec3d2a4c58e91f0be369fc.patch
new file mode 100644
index 0000000000..ee7b5fc0bc
--- /dev/null
+++ b/community/appstream/1109c847b272be6b65ec3d2a4c58e91f0be369fc.patch
@@ -0,0 +1,33 @@
+From 1109c847b272be6b65ec3d2a4c58e91f0be369fc Mon Sep 17 00:00:00 2001
+From: Matthias Klumpp <matthias@tenstral.net>
+Date: Thu, 3 Sep 2020 00:07:48 +0200
+Subject: [PATCH] validator: Don't pass NULL to vprintf, it's not an allowed
+ value
+
+The format parameter is listed as non-nullable in the API documentation,
+and crashes were reported indicating that this does cause real-world
+issues. This likely fixes
+https://github.com/ximion/appstream-generator/issues/83
+---
+ src/as-validator.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/as-validator.c b/src/as-validator.c
+index 32704b70..53d87f8f 100644
+--- a/src/as-validator.c
++++ b/src/as-validator.c
+@@ -158,9 +158,11 @@ as_validator_add_issue (AsValidator *validator, xmlNode *node, const gchar *tag,
+ explanation = tag_data->explanation;
+ }
+
+- va_start (args, format);
+- buffer = g_strdup_vprintf (format, args);
+- va_end (args);
++ if (format != NULL) {
++ va_start (args, format);
++ buffer = g_strdup_vprintf (format, args);
++ va_end (args);
++ }
+
+ issue = as_validator_issue_new ();
+ as_validator_issue_set_tag (issue, tag_final);
diff --git a/community/appstream/APKBUILD b/community/appstream/APKBUILD
index 41b707e281..3437bee9ec 100644
--- a/community/appstream/APKBUILD
+++ b/community/appstream/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer:
pkgname=appstream
pkgver=0.12.11
-pkgrel=1
+pkgrel=2
pkgdesc="Provides a standard for creating app stores across distributions"
url="https://distributions.freedesktop.org/wiki/AppStream"
arch="all"
@@ -12,7 +12,8 @@ makedepends="meson yaml-dev libxml2-dev glib-dev lmdb-dev gobject-introspection-
triggers="$pkgname.trigger=/usr/share/app-info/*"
install="$pkgname.post-install $pkgname.post-upgrade"
subpackages="$pkgname-dev $pkgname-doc $pkgname-qt $pkgname-lang $pkgname-dbg"
-source="https://www.freedesktop.org/software/appstream/releases/AppStream-$pkgver.tar.xz"
+source="https://www.freedesktop.org/software/appstream/releases/AppStream-$pkgver.tar.xz
+ 1109c847b272be6b65ec3d2a4c58e91f0be369fc.patch"
builddir="$srcdir/AppStream-$pkgver"
build() {
@@ -49,4 +50,5 @@ qt() {
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libAppStreamQt.so.* "$subpkgdir"/usr/lib
}
-sha512sums="6000f4e9f995b2d481374db2409f212da9d48893c4a757cb7287e2731117f50d0ed284dedc0e24e505b3b7c9c9f38dd9a5f855eeb6c7445eb7203e74d4a5f790 AppStream-0.12.11.tar.xz"
+sha512sums="6000f4e9f995b2d481374db2409f212da9d48893c4a757cb7287e2731117f50d0ed284dedc0e24e505b3b7c9c9f38dd9a5f855eeb6c7445eb7203e74d4a5f790 AppStream-0.12.11.tar.xz
+5e7dff5eef8e82d61f451250218d85d46611e57e2480621aba178a84f1e143f78d69296b942abb4343b2fb94a917657d1e71f77b62b5a4be750e21c73a2bf6a6 1109c847b272be6b65ec3d2a4c58e91f0be369fc.patch"