update to 2.11.0

This commit is contained in:
dongyuzhen 2021-12-10 15:59:40 +08:00
parent 290767d167
commit 29746540d7
13 changed files with 24 additions and 58 deletions

View File

@ -1,45 +0,0 @@
From a3bab162b2ae616074c8877a04556932998aeacd Mon Sep 17 00:00:00 2001
From: Werner Lemberg <wl@gnu.org>
Date: Mon, 19 Oct 2020 23:45:28 +0200
Subject: [sfnt] Fix heap buffer overflow (#59308).
This is CVE-2020-15999.
* src/sfnt/pngshim.c (Load_SBit_Png): Test bitmap size earlier.
referencehttps://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=a3bab162b2ae616074c8877a04556932998aeacd
---
src/sfnt/pngshim.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/sfnt/pngshim.c b/src/sfnt/pngshim.c
index 523b30a..5502108 100644
--- a/src/sfnt/pngshim.c
+++ b/src/sfnt/pngshim.c
@@ -328,6 +328,13 @@
if ( populate_map_and_metrics )
{
+ /* reject too large bitmaps similarly to the rasterizer */
+ if ( imgHeight > 0x7FFF || imgWidth > 0x7FFF )
+ {
+ error = FT_THROW( Array_Too_Large );
+ goto DestroyExit;
+ }
+
metrics->width = (FT_UShort)imgWidth;
metrics->height = (FT_UShort)imgHeight;
@@ -336,13 +343,6 @@
map->pixel_mode = FT_PIXEL_MODE_BGRA;
map->pitch = (int)( map->width * 4 );
map->num_grays = 256;
-
- /* reject too large bitmaps similarly to the rasterizer */
- if ( map->rows > 0x7FFF || map->width > 0x7FFF )
- {
- error = FT_THROW( Array_Too_Large );
- goto DestroyExit;
- }
}
/* convert palette/gray image to rgb */
--
2.27.0

View File

@ -7,6 +7,7 @@ Enable modules gxvalid and otvalid
Conflict:NA
Reference:https://src.fedoraproject.org/rpms/freetype/c/cbf2c99f7813750cb82deb367a37e50dbb709395
--- freetype-2.2.1/modules.cfg.orig 2006-07-07 21:01:09.000000000 -0400
+++ freetype-2.2.1/modules.cfg 2006-07-07 21:01:54.000000000 -0400
@@ -110,7 +110,7 @@

View File

@ -9,8 +9,8 @@ Reference:https://src.fedoraproject.org/rpms/freetype/c/c1c64f8cf9264592bca747c9
--- freetype-2.3.0/include/freetype/config/ftoption.h.spf 2007-01-18 14:27:34.000000000 -0500
+++ freetype-2.3.0/include/freetype/config/ftoption.h 2007-01-18 14:27:48.000000000 -0500
@@ -92,7 +92,7 @@
* macro is not defined, FreeType offers alternative LCD rendering
* technology that produces excellent output without LCD filtering.
* When this macro is not defined, FreeType offers alternative LCD
* rendering technology that produces excellent output.
*/
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING

View File

@ -14,4 +14,4 @@
+ EXES += fttimer
# EXES += testname
exes: $(EXES:%=$(BIN_DIR_2)/%$E)
# Not all demo programs have a man page; we thus check for existence in a

View File

@ -5,6 +5,7 @@ Subject: Don't show path of non-existing libtool file
Conflict:NA
Reference:https://src.fedoraproject.org/rpms/freetype/c/928ba6125d73435fddd73f9bf155e0f2a813bab7
--- freetype-2.8/builds/unix/freetype-config.in.orig 2017-03-30 12:20:23.000000001 +0200
+++ freetype-2.8/builds/unix/freetype-config.in 2017-05-16 13:25:39.223041128 +0200
@@ -205,7 +205,7 @@ if test "$echo_libs" = "yes" ; then

View File

@ -9,6 +9,7 @@ Resolves: #1497443
Conflict:NA
Reference:https://src.fedoraproject.org/rpms/freetype/c/1007098e54f9449281f83516f0272afa5d20ec29?branch=rawhide
--- freetype-2.9/builds/unix/freetype-config.in
+++ freetype-2.9/builds/unix/freetype-config.in
@@ -13,45 +13,25 @@ LC_ALL=C

Binary file not shown.

BIN
freetype-2.11.0.tar.xz Normal file

Binary file not shown.

Binary file not shown.

BIN
freetype-doc-2.11.0.tar.xz Normal file

Binary file not shown.

View File

@ -3,8 +3,8 @@
%{!?with_xfree86:%define with_xfree86 1}
Name: freetype
Version: 2.10.2
Release: 3
Version: 2.11.0
Release: 1
Summary: FreeType is a freely available software library to render fonts
License: (FTL or GPLv2+) and BSD and MIT and Public Domain and zlib with acknowledgement
URL: http://www.freetype.org
@ -13,8 +13,7 @@ Source1: http://download.savannah.gnu.org/releases/freetype/freetype-doc-
Source2: http://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.xz
Source3: ftconfig.h
Patch1: freetype-2.5.2-more-demos.patch
Patch2: CVE-2020-15999.patch
Patch1: backport-freetype-2.5.2-more-demos.patch
Patch6000: backport-freetype-2.3.0-enable-spr.patch
Patch6001: backport-freetype-2.2.1-enable-valid.patch
Patch6002: backport-freetype-2.6.5-libtool.patch
@ -24,17 +23,22 @@ Patch6005: backport-freetype-2.10.1-debughook.patch
BuildRequires: gcc libX11-devel libpng-devel zlib-devel bzip2-devel
Provides: %{name}-bytecode %{name}-demos
Provides: %{name}-bytecode
%if %{?_with_subpixel_rendering:1}%{!?_with_subpixel_rendering:0}
Provides: %{name}-subpixel
%endif
Obsoletes: %{name}-demos
%description
FreeType is written in C, designed to be small,efficient, highly customizable, and portable while capable of producing high-quality
output (glyph images) of most vector and bitmap font formats
%package demos
Summary: A collection of freetype demos
Requires: %{name} = %{version}-%{release}
%description demos
The FreeType engine is a free and portable font rendering engine,developed to provide advanced font support for a variety of platforms and environments.The demos package includes a set of useful small utilities showing various capabilities of the FreeType library.
%package devel
Summary: FreeType development libraries and header files
Requires: %{name} = %{version}-%{release} pkgconf
@ -57,7 +61,6 @@ Man pages and other related for freetype documents.
pushd ft2demos-%{version}
%patch1 -p1 -b .more-demos
popd
%patch2 -p1
%patch6000 -p1
%patch6001 -p1
%patch6002 -p1
@ -112,9 +115,11 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/co
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%license docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT
%{!?_licensedir:%global license %%doc}
%license LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT
%{_libdir}/libfreetype.so.*
%files demos
%{_bindir}/ft*
%files devel
@ -135,6 +140,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/co
%{_mandir}/man1/*
%changelog
* Fri Dec 10 2021 dongyuzhen <dongyuzhen@huawei.com> - 2.11.0-1
- update to 2.11.0
* Tue Apr 13 2021 hanhui<hanhui15@huawei.com> - 2.10.2-3
- Type:bugfix
- CVE:NA

Binary file not shown.

BIN
ft2demos-2.11.0.tar.xz Normal file

Binary file not shown.