Fixes crash in pango_fc_font_key_get_variations when key is null
This commit is contained in:
parent
33f39ed1e1
commit
85a1d2355d
31
pango-fixes-get-variations-crash.patch
Normal file
31
pango-fixes-get-variations-crash.patch
Normal file
@ -0,0 +1,31 @@
|
||||
commit ad92e199f221499c19f22dce7a16e7d770ad3ae7
|
||||
Author: Carsten Pfeiffer <carsten.pfeiffer@gebit.de>
|
||||
Date: Fri Aug 10 16:06:20 2018 +0200
|
||||
|
||||
Fix crash in pango_fc_font_key_get_variations() when key is null
|
||||
|
||||
diff --git a/pango/pangofc-shape.c b/pango/pangofc-shape.c
|
||||
index a59ca67c..53269d73 100644
|
||||
--- a/pango/pangofc-shape.c
|
||||
+++ b/pango/pangofc-shape.c
|
||||
@@ -380,8 +380,10 @@ _pango_fc_shape (PangoFont *font,
|
||||
fc_font->is_hinted ? ft_face->size->metrics.x_ppem : 0,
|
||||
fc_font->is_hinted ? ft_face->size->metrics.y_ppem : 0);
|
||||
|
||||
- variations = pango_fc_font_key_get_variations (key);
|
||||
- if (variations)
|
||||
+ if (key)
|
||||
+ {
|
||||
+ variations = pango_fc_font_key_get_variations (key);
|
||||
+ if (variations)
|
||||
{
|
||||
guint n_variations;
|
||||
hb_variation_t *hb_variations;
|
||||
@@ -391,6 +393,7 @@ _pango_fc_shape (PangoFont *font,
|
||||
|
||||
g_free (hb_variations);
|
||||
}
|
||||
+ }
|
||||
|
||||
hb_buffer = acquire_buffer (&free_buffer);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
%global glib2_version 2.33.12
|
||||
%global glib2_version 2.56.1
|
||||
%global freetype_version 2.1.5
|
||||
%global fontconfig_version 2.11.91
|
||||
%global cairo_version 1.12.10
|
||||
@ -9,12 +9,13 @@
|
||||
|
||||
Name: pango
|
||||
Version: 1.42.4
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: System for layout and rendering of internationalized text
|
||||
|
||||
License: LGPLv2+
|
||||
URL: http://www.pango.org
|
||||
Source0: https://download.gnome.org/sources/%{name}/1.42/%{name}-%{version}.tar.xz
|
||||
Patch0: pango-fixes-get-variations-crash.patch
|
||||
|
||||
BuildRequires: pkgconfig(cairo) >= %{cairo_version}
|
||||
BuildRequires: pkgconfig(freetype2) >= %{freetype_version}
|
||||
@ -75,6 +76,7 @@ the functionality of the installed %{name} package.
|
||||
|
||||
%prep
|
||||
%setup -q -n pango-%{version}
|
||||
%patch0 -p1 -b .crash
|
||||
|
||||
|
||||
%build
|
||||
@ -128,6 +130,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jan 18 2019 Peng Wu <pwu@redhat.com> - 1.42.4-2
|
||||
- Fixes crash in pango_fc_font_key_get_variations when key is null
|
||||
|
||||
* Mon Aug 20 2018 David King <amigadave@amigadave.com> - 1.42.4-1
|
||||
- Update to 1.42.4
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user