From 39671f3aacc2230c9dcd8388bde1196858b7fe6f Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 01 2017 03:31:02 +0000 Subject: import freetype-2.4.11-15.el7 --- diff --git a/SOURCES/freetype-2.4.11-libtool.patch b/SOURCES/freetype-2.4.11-libtool.patch new file mode 100644 index 0000000..203913e --- /dev/null +++ b/SOURCES/freetype-2.4.11-libtool.patch @@ -0,0 +1,12 @@ +--- freetype-2.4.11/builds/unix/freetype-config.in ++++ freetype-2.4.11/builds/unix/freetype-config.in +@@ -153,8 +153,7 @@ if test "$echo_libs" = "yes" ; then + fi + + if test "$echo_libtool" = "yes" ; then +- convlib="libfreetype.la" +- echo ${SYSROOT}$libdir/$convlib ++ echo "" + fi + + # EOF diff --git a/SOURCES/freetype-2.4.11-signed.patch b/SOURCES/freetype-2.4.11-signed.patch new file mode 100644 index 0000000..6069928 --- /dev/null +++ b/SOURCES/freetype-2.4.11-signed.patch @@ -0,0 +1,399 @@ +--- freetype-2.4.11/src/base/ftstream.c ++++ freetype-2.4.11/src/base/ftstream.c +@@ -373,6 +373,25 @@ + } + + ++ FT_BASE_DEF( FT_Short ) ++ FT_Stream_GetShort( FT_Stream stream ) ++ { ++ FT_Byte* p; ++ FT_Short result; ++ ++ ++ FT_ASSERT( stream && stream->cursor ); ++ ++ result = 0; ++ p = stream->cursor; ++ if ( p + 1 < stream->limit ) ++ result = FT_NEXT_SHORT( p ); ++ stream->cursor = p; ++ ++ return result; ++ } ++ ++ + FT_BASE_DEF( FT_UShort ) + FT_Stream_GetUShortLE( FT_Stream stream ) + { +@@ -392,6 +411,25 @@ + } + + ++ FT_BASE_DEF( FT_Short ) ++ FT_Stream_GetShortLE( FT_Stream stream ) ++ { ++ FT_Byte* p; ++ FT_Short result; ++ ++ ++ FT_ASSERT( stream && stream->cursor ); ++ ++ result = 0; ++ p = stream->cursor; ++ if ( p + 1 < stream->limit ) ++ result = FT_NEXT_SHORT_LE( p ); ++ stream->cursor = p; ++ ++ return result; ++ } ++ ++ + FT_BASE_DEF( FT_ULong ) + FT_Stream_GetUOffset( FT_Stream stream ) + { +@@ -410,6 +448,24 @@ + } + + ++ FT_BASE_DEF( FT_Long ) ++ FT_Stream_GetOffset( FT_Stream stream ) ++ { ++ FT_Byte* p; ++ FT_Long result; ++ ++ ++ FT_ASSERT( stream && stream->cursor ); ++ ++ result = 0; ++ p = stream->cursor; ++ if ( p + 2 < stream->limit ) ++ result = FT_NEXT_OFF3( p ); ++ stream->cursor = p; ++ return result; ++ } ++ ++ + FT_BASE_DEF( FT_ULong ) + FT_Stream_GetULong( FT_Stream stream ) + { +@@ -428,6 +484,24 @@ + } + + ++ FT_BASE_DEF( FT_Long ) ++ FT_Stream_GetLong( FT_Stream stream ) ++ { ++ FT_Byte* p; ++ FT_Long result; ++ ++ ++ FT_ASSERT( stream && stream->cursor ); ++ ++ result = 0; ++ p = stream->cursor; ++ if ( p + 3 < stream->limit ) ++ result = FT_NEXT_LONG( p ); ++ stream->cursor = p; ++ return result; ++ } ++ ++ + FT_BASE_DEF( FT_ULong ) + FT_Stream_GetULongLE( FT_Stream stream ) + { +@@ -446,6 +520,24 @@ + } + + ++ FT_BASE_DEF( FT_Long ) ++ FT_Stream_GetLongLE( FT_Stream stream ) ++ { ++ FT_Byte* p; ++ FT_Long result; ++ ++ ++ FT_ASSERT( stream && stream->cursor ); ++ ++ result = 0; ++ p = stream->cursor; ++ if ( p + 3 < stream->limit ) ++ result = FT_NEXT_LONG_LE( p ); ++ stream->cursor = p; ++ return result; ++ } ++ ++ + FT_BASE_DEF( FT_Char ) + FT_Stream_ReadChar( FT_Stream stream, + FT_Error* error ) +@@ -530,6 +622,53 @@ + } + + ++ FT_BASE_DEF( FT_Short ) ++ FT_Stream_ReadShort( FT_Stream stream, ++ FT_Error* error ) ++ { ++ FT_Byte reads[2]; ++ FT_Byte* p = 0; ++ FT_Short result = 0; ++ ++ ++ FT_ASSERT( stream ); ++ ++ *error = FT_Err_Ok; ++ ++ if ( stream->pos + 1 < stream->size ) ++ { ++ if ( stream->read ) ++ { ++ if ( stream->read( stream, stream->pos, reads, 2L ) != 2L ) ++ goto Fail; ++ ++ p = reads; ++ } ++ else ++ { ++ p = stream->base + stream->pos; ++ } ++ ++ if ( p ) ++ result = FT_NEXT_SHORT( p ); ++ } ++ else ++ goto Fail; ++ ++ stream->pos += 2; ++ ++ return result; ++ ++ Fail: ++ *error = FT_Err_Invalid_Stream_Operation; ++ FT_ERROR(( "FT_Stream_ReadShort:" ++ " invalid i/o; pos = 0x%lx, size = 0x%lx\n", ++ stream->pos, stream->size )); ++ ++ return 0; ++ } ++ ++ + FT_BASE_DEF( FT_UShort ) + FT_Stream_ReadUShortLE( FT_Stream stream, + FT_Error* error ) +@@ -577,6 +716,53 @@ + } + + ++ FT_BASE_DEF( FT_Short ) ++ FT_Stream_ReadShortLE( FT_Stream stream, ++ FT_Error* error ) ++ { ++ FT_Byte reads[2]; ++ FT_Byte* p = 0; ++ FT_Short result = 0; ++ ++ ++ FT_ASSERT( stream ); ++ ++ *error = FT_Err_Ok; ++ ++ if ( stream->pos + 1 < stream->size ) ++ { ++ if ( stream->read ) ++ { ++ if ( stream->read( stream, stream->pos, reads, 2L ) != 2L ) ++ goto Fail; ++ ++ p = reads; ++ } ++ else ++ { ++ p = stream->base + stream->pos; ++ } ++ ++ if ( p ) ++ result = FT_NEXT_SHORT_LE( p ); ++ } ++ else ++ goto Fail; ++ ++ stream->pos += 2; ++ ++ return result; ++ ++ Fail: ++ *error = FT_Err_Invalid_Stream_Operation; ++ FT_ERROR(( "FT_Stream_ReadShortLE:" ++ " invalid i/o; pos = 0x%lx, size = 0x%lx\n", ++ stream->pos, stream->size )); ++ ++ return 0; ++ } ++ ++ + FT_BASE_DEF( FT_ULong ) + FT_Stream_ReadUOffset( FT_Stream stream, + FT_Error* error ) +@@ -624,6 +810,53 @@ + } + + ++ FT_BASE_DEF( FT_Long ) ++ FT_Stream_ReadOffset( FT_Stream stream, ++ FT_Error* error ) ++ { ++ FT_Byte reads[3]; ++ FT_Byte* p = 0; ++ FT_Long result = 0; ++ ++ ++ FT_ASSERT( stream ); ++ ++ *error = FT_Err_Ok; ++ ++ if ( stream->pos + 2 < stream->size ) ++ { ++ if ( stream->read ) ++ { ++ if (stream->read( stream, stream->pos, reads, 3L ) != 3L ) ++ goto Fail; ++ ++ p = reads; ++ } ++ else ++ { ++ p = stream->base + stream->pos; ++ } ++ ++ if ( p ) ++ result = FT_NEXT_OFF3( p ); ++ } ++ else ++ goto Fail; ++ ++ stream->pos += 3; ++ ++ return result; ++ ++ Fail: ++ *error = FT_Err_Invalid_Stream_Operation; ++ FT_ERROR(( "FT_Stream_ReadOffset:" ++ " invalid i/o; pos = 0x%lx, size = 0x%lx\n", ++ stream->pos, stream->size )); ++ ++ return 0; ++ } ++ ++ + FT_BASE_DEF( FT_ULong ) + FT_Stream_ReadULong( FT_Stream stream, + FT_Error* error ) +@@ -671,6 +904,53 @@ + } + + ++ FT_BASE_DEF( FT_Long ) ++ FT_Stream_ReadLong( FT_Stream stream, ++ FT_Error* error ) ++ { ++ FT_Byte reads[4]; ++ FT_Byte* p = 0; ++ FT_Long result = 0; ++ ++ ++ FT_ASSERT( stream ); ++ ++ *error = FT_Err_Ok; ++ ++ if ( stream->pos + 3 < stream->size ) ++ { ++ if ( stream->read ) ++ { ++ if ( stream->read( stream, stream->pos, reads, 4L ) != 4L ) ++ goto Fail; ++ ++ p = reads; ++ } ++ else ++ { ++ p = stream->base + stream->pos; ++ } ++ ++ if ( p ) ++ result = FT_NEXT_LONG( p ); ++ } ++ else ++ goto Fail; ++ ++ stream->pos += 4; ++ ++ return result; ++ ++ Fail: ++ *error = FT_Err_Invalid_Stream_Operation; ++ FT_ERROR(( "FT_Stream_ReadLong:" ++ " invalid i/o; pos = 0x%lx, size = 0x%lx\n", ++ stream->pos, stream->size )); ++ ++ return 0; ++ } ++ ++ + FT_BASE_DEF( FT_ULong ) + FT_Stream_ReadULongLE( FT_Stream stream, + FT_Error* error ) +@@ -714,6 +994,53 @@ + " invalid i/o; pos = 0x%lx, size = 0x%lx\n", + stream->pos, stream->size )); + ++ return 0; ++ } ++ ++ ++ FT_BASE_DEF( FT_Long ) ++ FT_Stream_ReadLongLE( FT_Stream stream, ++ FT_Error* error ) ++ { ++ FT_Byte reads[4]; ++ FT_Byte* p = 0; ++ FT_Long result = 0; ++ ++ ++ FT_ASSERT( stream ); ++ ++ *error = FT_Err_Ok; ++ ++ if ( stream->pos + 3 < stream->size ) ++ { ++ if ( stream->read ) ++ { ++ if ( stream->read( stream, stream->pos, reads, 4L ) != 4L ) ++ goto Fail; ++ ++ p = reads; ++ } ++ else ++ { ++ p = stream->base + stream->pos; ++ } ++ ++ if ( p ) ++ result = FT_NEXT_LONG_LE( p ); ++ } ++ else ++ goto Fail; ++ ++ stream->pos += 4; ++ ++ return result; ++ ++ Fail: ++ *error = FT_Err_Invalid_Stream_Operation; ++ FT_ERROR(( "FT_Stream_ReadLongLE:" ++ " invalid i/o; pos = 0x%lx, size = 0x%lx\n", ++ stream->pos, stream->size )); ++ + return 0; + } + diff --git a/SPECS/freetype.spec b/SPECS/freetype.spec index a0a7482..c98aa1b 100644 --- a/SPECS/freetype.spec +++ b/SPECS/freetype.spec @@ -7,7 +7,7 @@ Summary: A free and portable font rendering engine Name: freetype Version: 2.4.11 -Release: 12%{?dist} +Release: 15%{?dist} License: (FTL or GPLv2+) and BSD and MIT and Public Domain and zlib with acknowledgement Group: System Environment/Libraries URL: http://www.freetype.org @@ -55,6 +55,12 @@ Patch109: freetype-2.4.11-pcf-read-a.patch Patch110: freetype-2.4.11-pcf-read-b.patch Patch111: freetype-2.4.11-inode-overflow.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1368141 +Patch112: freetype-2.4.11-libtool.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1381678 +Patch113: freetype-2.4.11-signed.patch + Buildroot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) BuildRequires: libX11-devel @@ -138,6 +144,8 @@ popd %patch109 -p1 -b .pcf-read-a %patch110 -p1 -b .pcf-read-b %patch111 -p1 -b .inode-overflow +%patch112 -p1 -b .libtool +%patch113 -p1 -b .signed %build @@ -255,6 +263,18 @@ rm -rf $RPM_BUILD_ROOT %doc docs/tutorial %changelog +* Mon Feb 20 2017 Marek Kasik - 2.4.11-15 +- Fix shellcheck warning (coverity) +- Related: #1368141 + +* Mon Feb 20 2017 Marek Kasik - 2.4.11-14 +- Backport functions for reading signed values from stream +- Resolves: #1381678 + +* Fri Feb 17 2017 Marek Kasik - 2.4.11-13 +- Don't show path of non-existing libtool file +- Resolves: #1368141 + * Tue Mar 22 2016 Marek Kasik - 2.4.11-12 - Define _FILE_OFFSET_BITS=64 to handle inodes higher than or equal to 2^31 - Resolves: #1303268