Received: by mail.netbsd.org (Postfix, from userid 605) id F0AAD84DF8; Thu, 9 Jul 2020 14:38:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 79EC484DF5 for ; Thu, 9 Jul 2020 14:38:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id wmI1KDTN-Hvd for ; Thu, 9 Jul 2020 14:38:56 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id E985084CE7 for ; Thu, 9 Jul 2020 14:38:55 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id E317EFB28; Thu, 9 Jul 2020 14:38:55 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1594305535287670" MIME-Version: 1.0 Date: Thu, 9 Jul 2020 14:38:55 +0000 From: "Leonardo Taccari" Subject: CVS commit: pkgsrc/graphics/cairo To: pkgsrc-changes@NetBSD.org Reply-To: leot@netbsd.org X-Mailer: log_accum Message-Id: <20200709143855.E317EFB28@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1594305535287670 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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.146 pkgsrc/graphics/cairo/Makefile cvs rdiff -u -r1.88 -r1.89 pkgsrc/graphics/cairo/distinfo cvs rdiff -u -r0 -r1.1 \ 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. --_----------=_1594305535287670 Content-Disposition: inline Content-Length: 2610 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/graphics/cairo/Makefile diff -u pkgsrc/graphics/cairo/Makefile:1.145 pkgsrc/graphics/cairo/Makefile:1.146 --- pkgsrc/graphics/cairo/Makefile:1.145 Wed Aug 28 22:08:12 2019 +++ pkgsrc/graphics/cairo/Makefile Thu Jul 9 14:38:55 2020 @@ -1,7 +1,9 @@ -# $NetBSD: Makefile,v 1.145 2019/08/28 22:08:12 wiz Exp $ +# $NetBSD: Makefile,v 1.146 2020/07/09 14:38:55 leot 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.89 --- pkgsrc/graphics/cairo/distinfo:1.88 Wed Nov 14 17:14:52 2018 +++ pkgsrc/graphics/cairo/distinfo Thu Jul 9 14:38:55 2020 @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.88 2018/11/14 17:14:52 kleink Exp $ +$NetBSD: distinfo,v 1.89 2020/07/09 14:38:55 leot 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 --- /dev/null Thu Jul 9 14:38:55 2020 +++ pkgsrc/graphics/cairo/patches/patch-src_cairo-ft-font.c Thu Jul 9 14:38:55 2020 @@ -0,0 +1,34 @@ +$NetBSD: patch-src_cairo-ft-font.c,v 1.1 2020/07/09 14:38:55 leot 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 + } + } + --_----------=_1594305535287670--