Skip to content
Snippets Groups Projects
Commit 5d77d28b authored by Rasmus Thomsen's avatar Rasmus Thomsen
Browse files

community/appstream: apply upstream patch to fix SEGFAULTs in appstream-generator

parent 229ccbea
1 merge request!12003community/appstream: apply upstream patch to fix SEGFAULTs in appstream-generator
Upstream: Yes
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);
......@@ -2,7 +2,7 @@
# Maintainer:
pkgname=appstream
pkgver=0.12.11
pkgrel=0
pkgrel=1
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"
source="https://www.freedesktop.org/software/appstream/releases/AppStream-$pkgver.tar.xz"
source="https://www.freedesktop.org/software/appstream/releases/AppStream-$pkgver.tar.xz
https://github.com/ximion/appstream/commit/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"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment