From ce853fdb866194283a410d89416a07080d4c7ebe Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Wed, 11 Jul 2012 10:19:09 +0200 Subject: [PATCH] Update to 2.4.10 Remove patches which are already included in upstream Resolves: #832651 --- freetype-2.4.9-CVE-2012-1139.patch | 11 --- freetype-2.4.9-CVE-2012-1141.patch | 10 --- freetype-2.4.9-incremental-interface.patch | 88 ---------------------- freetype-2.4.9-loop-exit-condition.patch | 16 ---- freetype.spec | 20 ++--- 5 files changed, 6 insertions(+), 139 deletions(-) delete mode 100644 freetype-2.4.9-CVE-2012-1139.patch delete mode 100644 freetype-2.4.9-CVE-2012-1141.patch delete mode 100644 freetype-2.4.9-incremental-interface.patch delete mode 100644 freetype-2.4.9-loop-exit-condition.patch diff --git a/freetype-2.4.9-CVE-2012-1139.patch b/freetype-2.4.9-CVE-2012-1139.patch deleted file mode 100644 index 380b3da..0000000 --- a/freetype-2.4.9-CVE-2012-1139.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/bdf/bdflib.c -+++ b/src/bdf/bdflib.c -@@ -842,7 +842,7 @@ - }; - - --#define isdigok( m, d ) (m[(d) >> 3] & ( 1 << ( (d) & 7 ) ) ) -+#define isdigok( m, d ) (m[(unsigned char)(d) >> 3] & ( 1 << ( (d) & 7 ) ) ) - - - /* Routine to convert an ASCII string into an unsigned long integer. */ diff --git a/freetype-2.4.9-CVE-2012-1141.patch b/freetype-2.4.9-CVE-2012-1141.patch deleted file mode 100644 index 71ac06b..0000000 --- a/freetype-2.4.9-CVE-2012-1141.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/bdf/bdflib.c -+++ b/src/bdf/bdflib.c -@@ -569,6 +569,7 @@ - list->field[1] = (char*)empty; - list->field[2] = (char*)empty; - list->field[3] = (char*)empty; -+ list->field[4] = (char*)empty; - } - - /* If the line is empty, then simply return. */ diff --git a/freetype-2.4.9-incremental-interface.patch b/freetype-2.4.9-incremental-interface.patch deleted file mode 100644 index 4dc741d..0000000 --- a/freetype-2.4.9-incremental-interface.patch +++ /dev/null @@ -1,88 +0,0 @@ ---- a/src/type1/t1load.c -+++ b/src/type1/t1load.c -@@ -71,6 +71,13 @@ - #include "t1errors.h" - - -+#ifdef FT_CONFIG_OPTION_INCREMENTAL -+#define IS_INCREMENTAL ( face->root.internal->incremental_interface != 0 ) -+#else -+#define IS_INCREMENTAL 0 -+#endif -+ -+ - /*************************************************************************/ - /* */ - /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ -@@ -1030,7 +1037,8 @@ - static int - read_binary_data( T1_Parser parser, - FT_Long* size, -- FT_Byte** base ) -+ FT_Byte** base, -+ FT_Bool incremental ) - { - FT_Byte* cur; - FT_Byte* limit = parser->root.limit; -@@ -1065,8 +1073,12 @@ - } - } - -- FT_ERROR(( "read_binary_data: invalid size field\n" )); -- parser->root.error = T1_Err_Invalid_File_Format; -+ if( !incremental ) -+ { -+ FT_ERROR(( "read_binary_data: invalid size field\n" )); -+ parser->root.error = T1_Err_Invalid_File_Format; -+ } -+ - return 0; - } - -@@ -1396,7 +1408,7 @@ - - idx = T1_ToInt( parser ); - -- if ( !read_binary_data( parser, &size, &base ) ) -+ if ( !read_binary_data( parser, &size, &base, IS_INCREMENTAL ) ) - return; - - /* The binary string is followed by one token, e.g. `NP' */ -@@ -1582,7 +1594,7 @@ - cur++; /* skip `/' */ - len = parser->root.cursor - cur; - -- if ( !read_binary_data( parser, &size, &base ) ) -+ if ( !read_binary_data( parser, &size, &base, IS_INCREMENTAL ) ) - return; - - /* for some non-standard fonts like `Optima' which provides */ -@@ -1871,7 +1883,7 @@ - - - parser->root.cursor = start_binary; -- if ( !read_binary_data( parser, &s, &b ) ) -+ if ( !read_binary_data( parser, &s, &b, IS_INCREMENTAL ) ) - return T1_Err_Invalid_File_Format; - have_integer = 0; - } -@@ -1884,7 +1896,7 @@ - - - parser->root.cursor = start_binary; -- if ( !read_binary_data( parser, &s, &b ) ) -+ if ( !read_binary_data( parser, &s, &b, IS_INCREMENTAL ) ) - return T1_Err_Invalid_File_Format; - have_integer = 0; - } -@@ -2160,9 +2172,7 @@ - type1->subrs_len = loader.subrs.lengths; - } - --#ifdef FT_CONFIG_OPTION_INCREMENTAL -- if ( !face->root.internal->incremental_interface ) --#endif -+ if ( !IS_INCREMENTAL ) - if ( !loader.charstrings.init ) - { - FT_ERROR(( "T1_Open_Face: no `/CharStrings' array in face\n" )); diff --git a/freetype-2.4.9-loop-exit-condition.patch b/freetype-2.4.9-loop-exit-condition.patch deleted file mode 100644 index 9edd4e8..0000000 --- a/freetype-2.4.9-loop-exit-condition.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/src/type1/t1load.c -+++ b/src/type1/t1load.c -@@ -1399,9 +1399,10 @@ - FT_Byte* base; - - -- /* If the next token isn't `dup' we are done. */ -- if ( parser->root.cursor + 4 < parser->root.limit && -- ft_strncmp( (char*)parser->root.cursor, "dup", 3 ) != 0 ) -+ /* If we are out of data, or if the next token isn't `dup', */ -+ /* we are done. */ -+ if ( parser->root.cursor + 4 >= parser->root.limit || -+ ft_strncmp( (char*)parser->root.cursor, "dup", 3 ) != 0 ) - break; - - T1_Skip_PS_Token( parser ); /* `dup' */ diff --git a/freetype.spec b/freetype.spec index 83f9394..9537c9d 100644 --- a/freetype.spec +++ b/freetype.spec @@ -6,7 +6,7 @@ Summary: A free and portable font rendering engine Name: freetype -Version: 2.4.9 +Version: 2.4.10 Release: 1%{?dist} License: FTL or GPLv2+ Group: System Environment/Libraries @@ -25,15 +25,6 @@ Patch47: freetype-2.3.11-more-demos.patch # Fix multilib conflicts Patch88: freetype-multilib.patch -Patch89: freetype-2.4.9-CVE-2012-1139.patch -Patch90: freetype-2.4.9-CVE-2012-1141.patch - -# https://savannah.nongnu.org/bugs/?35833 -Patch91: freetype-2.4.9-loop-exit-condition.patch - -#https://savannah.nongnu.org/bugs/?35847 -Patch92: freetype-2.4.9-incremental-interface.patch - Buildroot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) BuildRequires: libX11-devel @@ -93,10 +84,6 @@ pushd ft2demos-%{version} popd %patch88 -p1 -b .multilib -%patch89 -p1 -b .CVE-2012-1139 -%patch90 -p1 -b .CVE-2012-1141 -%patch91 -p1 -b .loop-exit-condition -%patch92 -p1 -b .incremental-interface %build @@ -229,6 +216,11 @@ rm -rf $RPM_BUILD_ROOT %doc docs/tutorial %changelog +* Wed Jul 11 2012 Marek Kasik 2.4.10-1 +- Update to 2.4.10 +- Remove patches which are already included in upstream +- Resolves: #832651 + * Fri Mar 30 2012 Marek Kasik 2.4.9-1 - Update to 2.4.9 - Fixes various CVEs