summaryrefslogtreecommitdiffstats
path: root/x11-libs
diff options
context:
space:
mode:
authorPavel Vinogradov2018-02-10 10:26:06 -0500
committerPavel Vinogradov2018-02-10 10:26:18 -0500
commita3baaf26cf07984b8cc4ac6e5c48276ac819b18a (patch)
treec154f18a79059ed5d97f92ca5cf31d39622a26bc /x11-libs
parentef09984d24ebbf7127142d9c48784d22ca921b07 (diff)
x11-libs/fontconfig: added an upstream patch to avoid crashes in devel branch
Diffstat (limited to 'x11-libs')
-rw-r--r--x11-libs/fontconfig/HISTORY3
-rwxr-xr-xx11-libs/fontconfig/PRE_BUILD6
-rw-r--r--x11-libs/fontconfig/crash.patch27
3 files changed, 36 insertions, 0 deletions
diff --git a/x11-libs/fontconfig/HISTORY b/x11-libs/fontconfig/HISTORY
index a7298cdc3e..5e1c71e752 100644
--- a/x11-libs/fontconfig/HISTORY
+++ b/x11-libs/fontconfig/HISTORY
@@ -1,3 +1,6 @@
+2018-02-10 Pavel Vinogradov <public@sourcemage.org>
+ * PRE_BUILD, crash.patch: added to fix crashing devel branch
+
2018-01-03 Treeve Jelbert <treeve@sourcemage.org>
* DETAILS: version 2.12.91 (devel)
* DEPENDS: add gettext itstool
diff --git a/x11-libs/fontconfig/PRE_BUILD b/x11-libs/fontconfig/PRE_BUILD
new file mode 100755
index 0000000000..c351bcdc20
--- /dev/null
+++ b/x11-libs/fontconfig/PRE_BUILD
@@ -0,0 +1,6 @@
+default_pre_build &&
+cd "${SOURCE_DIRECTORY}" &&
+
+if [[ "${FONTCONFIG_BRANCH}" == "devel" ]]; then
+ patch -p1 < "${SPELL_DIRECTORY}/crash.patch"
+fi
diff --git a/x11-libs/fontconfig/crash.patch b/x11-libs/fontconfig/crash.patch
new file mode 100644
index 0000000000..66031cdf01
--- /dev/null
+++ b/x11-libs/fontconfig/crash.patch
@@ -0,0 +1,27 @@
+From 7ca28c2fedb34c1db5ee3116d335f15195859db0 Mon Sep 17 00:00:00 2001
+From: Behdad Esfahbod <behdad@behdad.org>
+Date: Mon, 18 Dec 2017 21:22:21 -0500
+Subject: Don't crash
+
+Not proper fix necessarily. But fixes this crash:
+https://bugs.freedesktop.org/show_bug.cgi?id=101889#c81
+---
+ src/fcmatch.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/fcmatch.c b/src/fcmatch.c
+index 5d30cc7..95bb204 100644
+--- a/src/fcmatch.c
++++ b/src/fcmatch.c
+@@ -653,7 +653,7 @@ FcFontRenderPrepare (FcConfig *config,
+ if (!l)
+ goto bail0;
+ dir = FcStrDirname (FcValueString (&l->value));
+- if (FcHashTableFind (config->alias_table, dir, (void **) &alias))
++ if (config && FcHashTableFind (config->alias_table, dir, (void **) &alias))
+ {
+ FcChar8 *base = FcStrBasename (FcValueString (&l->value));
+ FcChar8 *s = FcStrBuildFilename (alias, base, NULL);
+--
+cgit v1.1
+