From 4600f62e520be8b019ed024814c7506181af929613a567e05401fe9fc08ab341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 2 May 2018 11:15:13 +0000 Subject: [PATCH] - Update to version 2.9.1 * Type 1 fonts containing flex features were not rendered correctly (bug introduced in version 2.9). * CVE-2018-6942: Older FreeType versions can crash with certain malformed variation fonts. * Bug fix: Multiple calls to `FT_Get_MM_Var' returned garbage. * Emboldening of bitmaps didn't work correctly sometimes, showing various artifacts (bug introduced in version 2.8.1). * The auto-hinter script ranges have been updated for Unicode 11. No support for new scripts have been added, however, with the exception of Georgian Mtavruli. - Drop upstreamed patches: * bnc1079600.patch * psaux-flex.patch * 0001-src-truetype-ttinterp.c-Ins_GETVARIATION-Avoid-NULL-.patch * 0001-truetype-Better-protection-against-invalid-VF-data.patch - Update to version 2.9.1 * No changelog upstream. OBS-URL: https://build.opensuse.org/package/show/M17N/freetype2?expand=0&rev=147 --- ...nterp.c-Ins_GETVARIATION-Avoid-NULL-.patch | 21 ----- ...r-protection-against-invalid-VF-data.patch | 14 --- bnc1079600.patch | 94 ------------------- freetype-2.9.1.tar.bz2 | 3 + freetype-2.9.tar.bz2 | 3 - freetype-doc-2.9.1.tar.bz2 | 3 + freetype-doc-2.9.tar.bz2 | 3 - freetype2.changes | 20 ++++ freetype2.spec | 24 +---- ft2demos-2.9.1.tar.bz2 | 3 + ft2demos-2.9.tar.bz2 | 3 - ft2demos.changes | 6 ++ ft2demos.spec | 8 +- psaux-flex.patch | 36 ------- 14 files changed, 44 insertions(+), 197 deletions(-) delete mode 100644 0001-src-truetype-ttinterp.c-Ins_GETVARIATION-Avoid-NULL-.patch delete mode 100644 0001-truetype-Better-protection-against-invalid-VF-data.patch delete mode 100644 bnc1079600.patch create mode 100644 freetype-2.9.1.tar.bz2 delete mode 100644 freetype-2.9.tar.bz2 create mode 100644 freetype-doc-2.9.1.tar.bz2 delete mode 100644 freetype-doc-2.9.tar.bz2 create mode 100644 ft2demos-2.9.1.tar.bz2 delete mode 100644 ft2demos-2.9.tar.bz2 delete mode 100644 psaux-flex.patch diff --git a/0001-src-truetype-ttinterp.c-Ins_GETVARIATION-Avoid-NULL-.patch b/0001-src-truetype-ttinterp.c-Ins_GETVARIATION-Avoid-NULL-.patch deleted file mode 100644 index 4820f4f..0000000 --- a/0001-src-truetype-ttinterp.c-Ins_GETVARIATION-Avoid-NULL-.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/src/truetype/ttinterp.c -+++ b/src/truetype/ttinterp.c -@@ -7532,8 +7532,16 @@ - return; - } - -- for ( i = 0; i < num_axes; i++ ) -- args[i] = coords[i] >> 2; /* convert 16.16 to 2.14 format */ -+ if ( coords ) -+ { -+ for ( i = 0; i < num_axes; i++ ) -+ args[i] = coords[i] >> 2; /* convert 16.16 to 2.14 format */ -+ } -+ else -+ { -+ for ( i = 0; i < num_axes; i++ ) -+ args[i] = 0; -+ } - } - - diff --git a/0001-truetype-Better-protection-against-invalid-VF-data.patch b/0001-truetype-Better-protection-against-invalid-VF-data.patch deleted file mode 100644 index 386440f..0000000 --- a/0001-truetype-Better-protection-against-invalid-VF-data.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/src/truetype/ttgxvar.c -+++ b/src/truetype/ttgxvar.c -@@ -2821,8 +2821,9 @@ - } - } - -- /* return value -1 indicates `no change' */ -- if ( !have_diff ) -+ /* return value -1 indicates `no change'; */ -+ /* we can exit early if `normalizedcoords' is already computed */ -+ if ( blend->normalizedcoords && !have_diff ) - return -1; - - if ( FT_NEW_ARRAY( normalized, mmvar->num_axis ) ) diff --git a/bnc1079600.patch b/bnc1079600.patch deleted file mode 100644 index ed04442..0000000 --- a/bnc1079600.patch +++ /dev/null @@ -1,94 +0,0 @@ -References: https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=4a03f17449ae45f0dacf4de4694ccd6e5e1b24d1 -Upstream: merged -From: Karol Babioch -Date: Thu Mar 8 17:52:43 CET 2018 - -Avoid integer overflow issues - -diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c -index 551f14a2e..5c8ff4f3d 100644 ---- a/src/truetype/ttinterp.c -+++ b/src/truetype/ttinterp.c -@@ -5782,6 +5782,7 @@ - FT_F26Dot6 distance; - #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY - FT_F26Dot6 control_value_cutin = 0; -+ FT_F26Dot6 delta; - - - if ( SUBPIXEL_HINTING_INFINALITY ) -@@ -5817,11 +5818,15 @@ - distance = PROJECT( exc->zp1.cur + point, exc->zp0.cur + exc->GS.rp0 ); - - #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY -+ delta = SUB_LONG( distance, args[1] ); -+ if ( delta < 0 ) -+ delta = NEG_LONG( delta ); -+ - /* subpixel hinting - make MSIRP respect CVT cut-in; */ -- if ( SUBPIXEL_HINTING_INFINALITY && -- exc->ignore_x_mode && -- exc->GS.freeVector.x != 0 && -- FT_ABS( SUB_LONG( distance, args[1] ) ) >= control_value_cutin ) -+ if ( SUBPIXEL_HINTING_INFINALITY && -+ exc->ignore_x_mode && -+ exc->GS.freeVector.x != 0 && -+ delta >= control_value_cutin ) - distance = args[1]; - #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */ - -@@ -5978,7 +5983,14 @@ - - if ( ( exc->opcode & 1 ) != 0 ) /* rounding and control cut-in flag */ - { -- if ( FT_ABS( distance - org_dist ) > control_value_cutin ) -+ FT_F26Dot6 delta; -+ -+ -+ delta = SUB_LONG( distance, org_dist ); -+ if ( delta < 0 ) -+ delta = NEG_LONG( delta ); -+ -+ if ( delta > control_value_cutin ) - distance = org_dist; - - #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY -@@ -6259,6 +6271,9 @@ - - if ( exc->GS.gep0 == exc->GS.gep1 ) - { -+ FT_F26Dot6 delta; -+ -+ - /* XXX: According to Greg Hitchcock, the following wording is */ - /* the right one: */ - /* */ -@@ -6271,7 +6286,11 @@ - /* `ttinst2.doc', version 1.66, is thus incorrect since */ - /* it implies `>=' instead of `>'. */ - -- if ( FT_ABS( cvt_dist - org_dist ) > control_value_cutin ) -+ delta = SUB_LONG( cvt_dist, org_dist ); -+ if ( delta < 0 ) -+ delta = NEG_LONG( delta ); -+ -+ if ( delta > control_value_cutin ) - cvt_dist = org_dist; - } - -@@ -6289,7 +6308,14 @@ - exc->ignore_x_mode && - exc->GS.gep0 == exc->GS.gep1 ) - { -- if ( FT_ABS( cvt_dist - org_dist ) > control_value_cutin ) -+ FT_F26Dot6 delta; -+ -+ -+ delta = SUB_LONG( cvt_dist, org_dist ); -+ if ( delta < 0 ) -+ delta = NEG_LONG( delta ); -+ -+ if ( delta > control_value_cutin ) - cvt_dist = org_dist; - } - #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */ diff --git a/freetype-2.9.1.tar.bz2 b/freetype-2.9.1.tar.bz2 new file mode 100644 index 0000000..a89f10d --- /dev/null +++ b/freetype-2.9.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db8d87ea720ea9d5edc5388fc7a0497bb11ba9fe972245e0f7f4c7e8b1e1e84d +size 1926385 diff --git a/freetype-2.9.tar.bz2 b/freetype-2.9.tar.bz2 deleted file mode 100644 index 570003d..0000000 --- a/freetype-2.9.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e6ffba3c8cef93f557d1f767d7bc3dee860ac7a3aaff588a521e081bc36f4c8a -size 1915013 diff --git a/freetype-doc-2.9.1.tar.bz2 b/freetype-doc-2.9.1.tar.bz2 new file mode 100644 index 0000000..3d9a803 --- /dev/null +++ b/freetype-doc-2.9.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa2f835ef8f50072630ddc48b9eb65f1f456014ffa3b5adddcb6bf390a3c5828 +size 2130292 diff --git a/freetype-doc-2.9.tar.bz2 b/freetype-doc-2.9.tar.bz2 deleted file mode 100644 index 59f1a64..0000000 --- a/freetype-doc-2.9.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7bbc3b067a465ae62484ba097c6d468ab0724c30b3d6329c77324c8901d03d78 -size 2128135 diff --git a/freetype2.changes b/freetype2.changes index 09d95bc..378eea0 100644 --- a/freetype2.changes +++ b/freetype2.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Wed May 2 10:54:32 UTC 2018 - idonmez@suse.com + +- Update to version 2.9.1 + * Type 1 fonts containing flex features were not rendered + correctly (bug introduced in version 2.9). + * CVE-2018-6942: Older FreeType versions can crash with certain + malformed variation fonts. + * Bug fix: Multiple calls to `FT_Get_MM_Var' returned garbage. + * Emboldening of bitmaps didn't work correctly sometimes, showing + various artifacts (bug introduced in version 2.8.1). + * The auto-hinter script ranges have been updated for Unicode 11. + No support for new scripts have been added, however, with the + exception of Georgian Mtavruli. +- Drop upstreamed patches: + * bnc1079600.patch + * psaux-flex.patch + * 0001-src-truetype-ttinterp.c-Ins_GETVARIATION-Avoid-NULL-.patch + * 0001-truetype-Better-protection-against-invalid-VF-data.patch + ------------------------------------------------------------------- Thu Mar 8 16:47:21 UTC 2018 - kbabioch@suse.com diff --git a/freetype2.spec b/freetype2.spec index ae590ff..86186a7 100644 --- a/freetype2.spec +++ b/freetype2.spec @@ -16,9 +16,9 @@ # -%define doc_version 2.9 +%define doc_version 2.9.1 Name: freetype2 -Version: 2.9 +Version: 2.9.1 Release: 0 Summary: A TrueType Font Library License: SUSE-Freetype OR GPL-2.0-or-later @@ -31,12 +31,7 @@ Source3: baselibs.conf Patch0: bugzilla-308961-cmex-workaround.patch # PATCH-FIX-OPENSUSE don-t-mark-libpng-as-required-library.patch -- it is private in .pc Patch1: don-t-mark-libpng-as-required-library.patch -# PATCH-FIX-UPSTREAM psaux-flex.patch -- Upstream commit cc2f3cdecff5a351e7e8961b9f2e389ab740231a -Patch2: psaux-flex.patch -Patch3: 0001-src-truetype-ttinterp.c-Ins_GETVARIATION-Avoid-NULL-.patch -Patch4: 0001-truetype-Better-protection-against-invalid-VF-data.patch -Patch5: enable-long-family-names-by-default.patch -Patch6: bnc1079600.patch +Patch2: enable-long-family-names-by-default.patch BuildRequires: gawk BuildRequires: libbz2-devel BuildRequires: libpng-devel @@ -102,10 +97,6 @@ It also contains a small tutorial for using that library. %patch0 -p1 %patch1 -p1 %patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 %build export CFLAGS="%{optflags} -std=gnu99 -D_GNU_SOURCE $(getconf LFS_CFLAGS)" @@ -123,6 +114,8 @@ install -Dm 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/profile.d/%{name}.sh # remove documentation that does not belong in an rpm rm docs/INSTALL* +rm %{buildroot}%{_libdir}/libfreetype.la + %post -n libfreetype6 -p /sbin/ldconfig %postun -n libfreetype6 -p /sbin/ldconfig @@ -137,15 +130,8 @@ rm docs/INSTALL* %files devel %doc docs/reference/* %{_includedir}/* -%if 0%{?suse_version} >= 1140 -%exclude %{_libdir}/libfreetype.*a -%else -%{_libdir}/libfreetype.*a -%endif %{_libdir}/libfreetype.so %{_libdir}/pkgconfig/freetype2.pc -%{_bindir}/* %{_datadir}/aclocal -%{_mandir}/man1/freetype-config* %changelog diff --git a/ft2demos-2.9.1.tar.bz2 b/ft2demos-2.9.1.tar.bz2 new file mode 100644 index 0000000..e131ee6 --- /dev/null +++ b/ft2demos-2.9.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:806eb6363ee5963174a6740f9b7893377912165899c2c1f6372c422aab818c6a +size 233462 diff --git a/ft2demos-2.9.tar.bz2 b/ft2demos-2.9.tar.bz2 deleted file mode 100644 index f03523d..0000000 --- a/ft2demos-2.9.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:874b20b6ebe514ba6acf9f6d1d63df21723206996179198121a68fd1f86cdee7 -size 230926 diff --git a/ft2demos.changes b/ft2demos.changes index 8b166b8..cbf7d45 100644 --- a/ft2demos.changes +++ b/ft2demos.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed May 2 10:56:39 UTC 2018 - idonmez@suse.com + +- Update to version 2.9.1 + * No changelog upstream. + ------------------------------------------------------------------- Tue Mar 20 10:21:23 UTC 2018 - ecsos@opensuse.org diff --git a/ft2demos.spec b/ft2demos.spec index 43e4336..15298d8 100644 --- a/ft2demos.spec +++ b/ft2demos.spec @@ -16,16 +16,16 @@ # -%define freetype_version 2.9 +%define freetype_version 2.9.1 Name: ft2demos -Version: 2.9 +Version: 2.9.1 Release: 0 Summary: Freetype2 Utilities and Demo Programs License: GPL-2.0-or-later Group: Productivity/Publishing/Other Url: https://www.freetype.org -Source0: https://savannah.nongnu.org/download/freetype/freetype-%{freetype_version}.tar.bz2 -Source1: https://savannah.nongnu.org/download/freetype/ft2demos-%{version}.tar.bz2 +Source0: https://download.savannah.nongnu.org/releases/freetype/freetype-%{freetype_version}.tar.bz2 +Source1: https://download.savannah.nongnu.org/releases/freetype/ft2demos-%{version}.tar.bz2 Source1000: bnc628213_test.otf Source1004: bnc629447_sigsegv31.ttf Source1013: bnc633938_badbdf.0 diff --git a/psaux-flex.patch b/psaux-flex.patch deleted file mode 100644 index 96c847e..0000000 --- a/psaux-flex.patch +++ /dev/null @@ -1,36 +0,0 @@ -From cc2f3cdecff5a351e7e8961b9f2e389ab740231a Mon Sep 17 00:00:00 2001 -From: Ewald Hew -Date: Wed, 10 Jan 2018 13:24:56 +0800 -Subject: [psaux] Correctly handle Flex features (#52846). - -* src/psaux/psintrp.c (cf2_interpT2CharString) : Do not move if doing Flex. ---- - ChangeLog | 7 +++++++ - src/psaux/psintrp.c | 6 ++++-- - 2 files changed, 11 insertions(+), 2 deletions(-) - -Index: freetype-2.9/src/psaux/psintrp.c -=================================================================== ---- freetype-2.9.orig/src/psaux/psintrp.c -+++ freetype-2.9/src/psaux/psintrp.c -@@ -852,7 +852,8 @@ - - curY = ADD_INT32( curY, cf2_stack_popFixed( opStack ) ); - -- cf2_glyphpath_moveTo( &glyphPath, curX, curY ); -+ if ( !decoder->flex_state ) -+ cf2_glyphpath_moveTo( &glyphPath, curX, curY ); - - break; - -@@ -2674,7 +2675,8 @@ - - curX = ADD_INT32( curX, cf2_stack_popFixed( opStack ) ); - -- cf2_glyphpath_moveTo( &glyphPath, curX, curY ); -+ if ( !decoder->flex_state ) -+ cf2_glyphpath_moveTo( &glyphPath, curX, curY ); - - break; -