Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/pkgsrc-2020Q2]: pkgsrc/graphics/cairo Pullup ticket #6270 - requested...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1f964ce687d9
branches:  pkgsrc-2020Q2
changeset: 435648:1f964ce687d9
user:      bsiegert <bsiegert%pkgsrc.org@localhost>
date:      Sat Jul 11 09:07:03 2020 +0000

description:
Pullup ticket #6270 - requested by leot
graphics/cairo: fix crashes

Revisions pulled up:
- graphics/cairo/Makefile                                       1.146
- graphics/cairo/distinfo                                       1.89
- graphics/cairo/patches/patch-src_cairo-ft-font.c              1.1

---
   Module Name:    pkgsrc
   Committed By:   leot
   Date:           Thu Jul  9 14:38:55 UTC 2020

   Modified Files:
           pkgsrc/graphics/cairo: Makefile distinfo
   Added Files:
           pkgsrc/graphics/cairo/patches: patch-src_cairo-ft-font.c

   Log Message:
   cairo: backport patches from upstream to use FT_Done_MM_Var instead of free

   Memory allocated via FT_Get_MM_Var should be freed via FT_Done_MM_Var since
   freetype 2.9.  Backport patches from upstream to address missing parts not doing
   that.

   PKGREVISION++

diffstat:

 graphics/cairo/Makefile                          |   4 ++-
 graphics/cairo/distinfo                          |   3 +-
 graphics/cairo/patches/patch-src_cairo-ft-font.c |  34 ++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 2 deletions(-)

diffs (66 lines):

diff -r b2b0ff197b4d -r 1f964ce687d9 graphics/cairo/Makefile
--- a/graphics/cairo/Makefile   Thu Jul 09 08:30:09 2020 +0000
+++ b/graphics/cairo/Makefile   Sat Jul 11 09:07:03 2020 +0000
@@ -1,7 +1,9 @@
-# $NetBSD: Makefile,v 1.145 2019/08/28 22:08:12 wiz Exp $
+# $NetBSD: Makefile,v 1.145.8.1 2020/07/11 09:07:03 bsiegert Exp $
 
 .include "../../graphics/cairo/Makefile.common"
 
+PKGREVISION=   1
+
 TEST_TARGET=                   check
 
 .include "options.mk"
diff -r b2b0ff197b4d -r 1f964ce687d9 graphics/cairo/distinfo
--- a/graphics/cairo/distinfo   Thu Jul 09 08:30:09 2020 +0000
+++ b/graphics/cairo/distinfo   Sat Jul 11 09:07:03 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.88 2018/11/14 17:14:52 kleink Exp $
+$NetBSD: distinfo,v 1.88.14.1 2020/07/11 09:07:03 bsiegert Exp $
 
 SHA1 (cairo-1.16.0.tar.xz) = 00e81842ae5e81bb0343108884eb5205be0eac14
 RMD160 (cairo-1.16.0.tar.xz) = cfd2ef6ec55b267e04600f6b1e36bb07f2566b35
@@ -8,3 +8,4 @@
 SHA1 (patch-ab) = 11f7e0e59bd5c51a8fdacb48dcf2f2fefdf3b768
 SHA1 (patch-ac) = 1785bbef6bcab4781bf89e1b986a7eb96e5f2b64
 SHA1 (patch-ad) = a1068a37113b162ccfe14d7f1bd0baa9df7e5530
+SHA1 (patch-src_cairo-ft-font.c) = 97288d79380473869f1049c1d8955a2f6fa3d178
diff -r b2b0ff197b4d -r 1f964ce687d9 graphics/cairo/patches/patch-src_cairo-ft-font.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/cairo/patches/patch-src_cairo-ft-font.c  Sat Jul 11 09:07:03 2020 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-src_cairo-ft-font.c,v 1.1.2.2 2020/07/11 09:07:03 bsiegert Exp $
+
+Use FT_Done_MM_Var instead of free when available.
+
+Fixes possible crashes and memory leaks.
+
+Backport from upstream commits 90e85c24, a68c1968.
+
+--- src/cairo-ft-font.c.orig   2020-07-09 14:26:11.503421448 +0000
++++ src/cairo-ft-font.c
+@@ -459,6 +459,11 @@ _cairo_ft_unscaled_font_init (cairo_ft_u
+               unscaled->variations = calloc (ft_mm_var->num_axis, sizeof (FT_Fixed));
+               if (unscaled->variations)
+                   FT_Get_Var_Design_Coordinates (face, ft_mm_var->num_axis, unscaled->variations);
++#if HAVE_FT_DONE_MM_VAR
++              FT_Done_MM_Var (face->glyph->library, ft_mm_var);
++#else
++              free (ft_mm_var);
++#endif
+           }
+       }
+ #endif
+@@ -2393,7 +2398,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
+     }
+ }
+ 



Home | Main Index | Thread Index | Old Index