Hello community,

here is the log from the commit of package cairo for openSUSE:Factory checked 
in at 2019-09-11 10:20:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cairo (Old)
 and      /work/SRC/openSUSE:Factory/.cairo.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cairo"

Wed Sep 11 10:20:36 2019 rev:89 rq:728255 version:1.16.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/cairo/cairo.changes      2018-11-06 
13:53:46.720302369 +0100
+++ /work/SRC/openSUSE:Factory/.cairo.new.7948/cairo.changes    2019-09-11 
10:20:38.195508952 +0200
@@ -1,0 +2,13 @@
+Wed Sep  4 09:59:21 UTC 2019 - Bjørn Lie <[email protected]>
+
+- Add 2 upstream bug fix patches:
+  + cairo-Use-FT_Done_MM_Var-instead-of-free-when-available.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
+  + cairo-composite_color_glyphs.patch: Fix a thinko in
+    composite_color_glyphs. We can't just move around the contents
+    of the passed-in string, we need to make a copy. This was
+    showing up as memory corruption in pango.
+
+-------------------------------------------------------------------

New:
----
  cairo-Use-FT_Done_MM_Var-instead-of-free-when-available.patch
  cairo-composite_color_glyphs.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cairo.spec ++++++
--- /var/tmp/diff_new_pack.bNKrrW/_old  2019-09-11 10:20:39.291508816 +0200
+++ /var/tmp/diff_new_pack.bNKrrW/_new  2019-09-11 10:20:39.291508816 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package cairo
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -31,6 +31,10 @@
 Patch0:         cairo-xlib-endianness.patch
 # PATCH-FIX-UPSTREAM cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff 
[email protected] -- Fix segfault in get_bitmap_surface
 Patch1:         cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff
+# PATCH-FIX-UPSTREAM 
cairo-Use-FT_Done_MM_Var-instead-of-free-when-available.patch -- ft: Use 
FT_Done_MM_Var instead of free when available in cairo_ft_apply_variations
+Patch2:         cairo-Use-FT_Done_MM_Var-instead-of-free-when-available.patch
+# PATCH-FIX-UPSTREAM cairo-composite_color_glyphs.patch -- Fix a thinko in 
composite_color_glyphs
+Patch3:         cairo-composite_color_glyphs.patch
 
 BuildRequires:  gtk-doc
 BuildRequires:  pkgconfig
@@ -138,9 +142,7 @@
 cairo.
 
 %prep
-%setup -q
-%patch0 -p1
-%patch1 -p1
+%autosetup -p1
 
 %build
 %configure \

++++++ cairo-Use-FT_Done_MM_Var-instead-of-free-when-available.patch ++++++
>From 90e85c2493fdfa3551f202ff10282463f1e36645 Mon Sep 17 00:00:00 2001
From: Carlos Garcia Campos <[email protected]>
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

++++++ cairo-composite_color_glyphs.patch ++++++
>From 79ad01724161502e8d9d2bd384ff1f0174e5df6e Mon Sep 17 00:00:00 2001
From: Matthias Clasen <[email protected]>
Date: Thu, 30 May 2019 07:30:55 -0400
Subject: [PATCH] Fix a thinko in composite_color_glyphs

We can't just move around the contents of the
passed-in string, we need to make a copy. This
was showing up as memory corruption in pango.

See https://gitlab.gnome.org/GNOME/pango/issues/346
---
 src/cairo-surface.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index c30f84087..e112b660a 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -2820,6 +2820,7 @@ _cairo_surface_show_text_glyphs (cairo_surface_t      
*surface,
                                 const cairo_clip_t             *clip)
 {
     cairo_int_status_t status;
+    char *utf8_copy = NULL;
 
     TRACE ((stderr, "%s\n", __FUNCTION__));
     if (unlikely (surface->status))
@@ -2847,6 +2848,10 @@ _cairo_surface_show_text_glyphs (cairo_surface_t     
*surface,
     status = CAIRO_INT_STATUS_UNSUPPORTED;
 
     if (_cairo_scaled_font_has_color_glyphs (scaled_font)) {
+        utf8_copy = malloc (sizeof (char) * utf8_len);
+        memcpy (utf8_copy, utf8, sizeof (char) * utf8_len);
+        utf8 = utf8_copy;
+
         status = composite_color_glyphs (surface, op,
                                          source,
                                          (char *)utf8, &utf8_len,
@@ -2861,6 +2866,8 @@ _cairo_surface_show_text_glyphs (cairo_surface_t      
*surface,
         if (num_glyphs == 0)
             goto DONE;
     }
+    else
+      utf8_copy = NULL;
 
     /* The logic here is duplicated in _cairo_analysis_surface show_glyphs and
      * show_text_glyphs.  Keep in synch. */
@@ -2918,6 +2925,9 @@ _cairo_surface_show_text_glyphs (cairo_surface_t      
*surface,
        surface->serial++;
     }
 
+    if (utf8_copy)
+        free (utf8_copy);
+
     return _cairo_surface_set_error (surface, status);
 }

 

Reply via email to