pkgsrc-Changes archive

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

CVS commit: [pkgsrc-2020Q2] pkgsrc/graphics/cairo



Module Name:    pkgsrc
Committed By:   bsiegert
Date:           Sat Jul 11 09:07:03 UTC 2020

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

Log Message:
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++


To generate a diff of this commit:
cvs rdiff -u -r1.145 -r1.145.8.1 pkgsrc/graphics/cairo/Makefile
cvs rdiff -u -r1.88 -r1.88.14.1 pkgsrc/graphics/cairo/distinfo
cvs rdiff -u -r0 -r1.1.2.2 \
    pkgsrc/graphics/cairo/patches/patch-src_cairo-ft-font.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/graphics/cairo/Makefile
diff -u pkgsrc/graphics/cairo/Makefile:1.145 pkgsrc/graphics/cairo/Makefile:1.145.8.1
--- pkgsrc/graphics/cairo/Makefile:1.145        Wed Aug 28 22:08:12 2019
+++ pkgsrc/graphics/cairo/Makefile      Sat Jul 11 09:07:03 2020
@@ -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"

Index: pkgsrc/graphics/cairo/distinfo
diff -u pkgsrc/graphics/cairo/distinfo:1.88 pkgsrc/graphics/cairo/distinfo:1.88.14.1
--- pkgsrc/graphics/cairo/distinfo:1.88 Wed Nov 14 17:14:52 2018
+++ pkgsrc/graphics/cairo/distinfo      Sat Jul 11 09:07:03 2020
@@ -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-aa) = b01bc60f77a7122b0c0d0d
 SHA1 (patch-ab) = 11f7e0e59bd5c51a8fdacb48dcf2f2fefdf3b768
 SHA1 (patch-ac) = 1785bbef6bcab4781bf89e1b986a7eb96e5f2b64
 SHA1 (patch-ad) = a1068a37113b162ccfe14d7f1bd0baa9df7e5530
+SHA1 (patch-src_cairo-ft-font.c) = 97288d79380473869f1049c1d8955a2f6fa3d178

Added files:

Index: pkgsrc/graphics/cairo/patches/patch-src_cairo-ft-font.c
diff -u /dev/null pkgsrc/graphics/cairo/patches/patch-src_cairo-ft-font.c:1.1.2.2
--- /dev/null   Sat Jul 11 09:07:03 2020
+++ pkgsrc/graphics/cairo/patches/patch-src_cairo-ft-font.c     Sat Jul 11 09:07:03 2020
@@ -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