diff --git a/0001-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch b/0001-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch new file mode 100644 index 0000000..3709c5a --- /dev/null +++ b/0001-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch @@ -0,0 +1,30 @@ +From 90e85c2493fdfa3551f202ff10282463f1e36645 Mon Sep 17 00:00:00 2001 +From: Carlos Garcia Campos +Date: Mon, 19 Nov 2018 12:33:07 +0100 +Subject: [PATCH] ft: Use FT_Done_MM_Var instead of free when available in + cairo_ft_apply_variations + +Fixes a crash when using freetype >= 2.9 +--- + src/cairo-ft-font.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c +index 325dd61b4..981973f78 100644 +--- a/src/cairo-ft-font.c ++++ b/src/cairo-ft-font.c +@@ -2393,7 +2393,11 @@ skip: + done: + free (coords); + free (current_coords); ++#if HAVE_FT_DONE_MM_VAR ++ FT_Done_MM_Var (face->glyph->library, ft_mm_var); ++#else + free (ft_mm_var); ++#endif + } + } + +-- +2.19.2 + diff --git a/cairo.spec b/cairo.spec index f358dec..f40a6ac 100644 --- a/cairo.spec +++ b/cairo.spec @@ -11,7 +11,7 @@ Name: cairo Version: 1.16.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A 2D graphics library License: LGPLv2 or MPLv1.1 @@ -23,6 +23,9 @@ Patch3: cairo-multilib.patch # https://gitlab.freedesktop.org/cairo/cairo/merge_requests/1 Patch4: 0001-Set-default-LCD-filter-to-FreeType-s-default.patch +# https://gitlab.freedesktop.org/cairo/cairo/merge_requests/5 +Patch5: 0001-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch + BuildRequires: gcc BuildRequires: pkgconfig BuildRequires: libXrender-devel @@ -173,6 +176,10 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %{_libdir}/cairo/ %changelog +* Fri Dec 7 2018 Marek Kasik - 1.16.0-3 +- Use FT_Done_MM_Var instead of free when available in +- cairo_ft_apply_variations + * Fri Dec 7 2018 Marek Kasik - 1.16.0-2 - Set default LCD filter to FreeType's default - Resolves: #1645763