Package: pango1.0 / 1.42.4-8~deb10u1

Fix-crash-in-pango_fc_font_key_get_variations-when-key-is.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From: Carsten Pfeiffer <carsten.pfeiffer@gebit.de>
Date: Fri, 10 Aug 2018 16:06:20 +0200
Subject: Fix crash in pango_fc_font_key_get_variations() when key is null

Bug: https://gitlab.gnome.org/GNOME/pango/merge_requests/12
Bug-Debian: https://bugs.debian.org/898960
Applied-upstream: 1.43.0, commit:ad92e199f221499c19f22dce7a16e7d770ad3ae7
---
 pango/pangofc-shape.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/pango/pangofc-shape.c b/pango/pangofc-shape.c
index a59ca67..53269d7 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);