diff --git a/0001-Fix-a-null-pointer-dereference-when-computing.patch b/0001-Fix-a-null-pointer-dereference-when-computing.patch deleted file mode 100644 index d75426ff6..000000000 --- a/0001-Fix-a-null-pointer-dereference-when-computing.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 80191ec6a13e1d2172ee9e70e2d50d1e04b6fb0e Mon Sep 17 00:00:00 2001 -From: Marcus Spencer -Date: Fri, 22 May 2026 13:56:36 -0500 -Subject: [PATCH] Fix a null pointer dereference when computing a pattern from - an FT_Face that has no family - -Closes #521 - -See ---- - src/fcfreetype.c | 39 +++++++++++++++++++++------------------ - 1 file changed, 21 insertions(+), 18 deletions(-) - -diff --git a/src/fcfreetype.c b/src/fcfreetype.c -index c57f9b33..05c2e8a0 100644 ---- a/src/fcfreetype.c -+++ b/src/fcfreetype.c -@@ -2080,28 +2080,31 @@ FcFreeTypeQueryFaceInternal (const FT_Face face, - int generic_family = FC_FAMILY_UNKNOWN; - - elt = FcPatternObjectFindElt (pat, FC_FAMILY_OBJECT); -- for (l = FcPatternEltValues (elt); l; l = FcValueListNext (l)) { -- FcValue v = FcValueCanonicalize (&l->value); -+ if (elt) { -+ for (l = FcPatternEltValues (elt); l; l = FcValueListNext (l)) { -+ FcValue v = FcValueCanonicalize (&l->value); - -- if (v.type == FcTypeString) { -- if (FcStrStrIgnoreCase (v.u.s, (FcChar8 *)"mono")) { -- generic_family = FC_FAMILY_MONO; -- break; -- } else if (FcStrStrIgnoreCase (v.u.s, (FcChar8 *)"sans")) { -- generic_family = FC_FAMILY_SANS; -- break; -- } else if (FcStrStrIgnoreCase (v.u.s, (FcChar8 *)"serif")) { -- generic_family = FC_FAMILY_SERIF; -- break; -- } else if (FcStrStrIgnoreCase (v.u.s, (FcChar8 *)"emoji")) { -- generic_family = FC_FAMILY_EMOJI; -- break; -- } else if (FcStrStrIgnoreCase (v.u.s, (FcChar8 *)"math")) { -- generic_family = FC_FAMILY_MATH; -- break; -+ if (v.type == FcTypeString) { -+ if (FcStrStrIgnoreCase (v.u.s, (FcChar8 *)"mono")) { -+ generic_family = FC_FAMILY_MONO; -+ break; -+ } else if (FcStrStrIgnoreCase (v.u.s, (FcChar8 *)"sans")) { -+ generic_family = FC_FAMILY_SANS; -+ break; -+ } else if (FcStrStrIgnoreCase (v.u.s, (FcChar8 *)"serif")) { -+ generic_family = FC_FAMILY_SERIF; -+ break; -+ } else if (FcStrStrIgnoreCase (v.u.s, (FcChar8 *)"emoji")) { -+ generic_family = FC_FAMILY_EMOJI; -+ break; -+ } else if (FcStrStrIgnoreCase (v.u.s, (FcChar8 *)"math")) { -+ generic_family = FC_FAMILY_MATH; -+ break; -+ } - } - } - } -+ - FcPatternObjectAddInteger(pat, FC_GENERIC_FAMILY_OBJECT, generic_family); - } - --- -GitLab - diff --git a/PKGBUILD b/PKGBUILD index 02480cd50..0a7baa10e 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,8 +1,8 @@ # Maintainer: Yukari Chiba pkgname=fontconfig -pkgver=2.18.0 -pkgrel=2 +pkgver=2.18.1 +pkgrel=1 pkgdesc="Library for configuring and customizing font access" url=https://www.freedesktop.org/wiki/Software/fontconfig/ arch=(x86_64 aarch64 riscv64 loongarch64) @@ -11,16 +11,10 @@ depends=(expat freetype2 musl) backup=(etc/fonts/fonts.conf) provides=(libfontconfig.so) makedepends=(gperf meson symlinks) -# 0001: Backport, 80191ec6a13e ("Fix a null pointer dereference when computing a pattern from an FT_Face that has no family ") -# fix libfontconfig.so related crashes when the font has no family, for -# example, Unifont. Without this patch, fc-match also fails to match -# Unifont in any way. source=("https://gitlab.freedesktop.org/fontconfig/${pkgname}/-/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz" - 0001-Fix-a-null-pointer-dereference-when-computing.patch fontconfig.hook) install=fontconfig.install -sha256sums=('5c94af4828988af6b1a8484ddba13b521162687f9e5129bd8f267b8f4cfbf619' - '59193f4f307df25c5815985cde11a777bd8772cce2a7dcf15f41fb84ce10629f' +sha256sums=('e9309564717b6301230112b173f36c288489479d381d2f0add1210ca5b16ba7e' 'fd7b6ce8ce178107f2e0b52462ebf186b6051c6eec945770107fda57048c9f34') prepare() {