Compare commits
No commits in common. "c9-beta" and "c8" have entirely different histories.
@ -1,3 +0,0 @@
|
||||
0181862673f7216ad2b5074f95fc131209e30b27 SOURCES/freetype-2.10.4.tar.xz
|
||||
9c86a3225cabc659914095c5f97b4844001bb733 SOURCES/freetype-doc-2.10.4.tar.xz
|
||||
d16eef3cb775532995db5826c4f4f6dbe883cc5b SOURCES/ft2demos-2.10.4.tar.xz
|
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,3 +1,3 @@
|
||||
SOURCES/freetype-2.10.4.tar.xz
|
||||
SOURCES/freetype-doc-2.10.4.tar.xz
|
||||
SOURCES/ft2demos-2.10.4.tar.xz
|
||||
SOURCES/freetype-2.9.1.tar.bz2
|
||||
SOURCES/freetype-doc-2.9.1.tar.bz2
|
||||
SOURCES/ft2demos-2.9.1.tar.bz2
|
||||
|
@ -1,72 +0,0 @@
|
||||
--- freetype-2.10.0/include/freetype/ftoutln.h
|
||||
+++ freetype-2.10.0/include/freetype/ftoutln.h
|
||||
@@ -165,6 +165,15 @@ FT_BEGIN_HEADER
|
||||
FT_Int numContours,
|
||||
FT_Outline *anoutline );
|
||||
|
||||
+ /*
|
||||
+ * Kept downstream for ABI compatibility only.
|
||||
+ * It just throws error now. Remove once soname has been bumped.
|
||||
+ */
|
||||
+ FT_EXPORT( FT_Error )
|
||||
+ FT_Outline_New_Internal( FT_Memory memory,
|
||||
+ FT_UInt numPoints,
|
||||
+ FT_Int numContours,
|
||||
+ FT_Outline *anoutline );
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
@@ -192,6 +201,13 @@ FT_BEGIN_HEADER
|
||||
FT_Outline_Done( FT_Library library,
|
||||
FT_Outline* outline );
|
||||
|
||||
+ /*
|
||||
+ * Kept downstream for ABI compatibility only.
|
||||
+ * It just throws error now. Remove once soname has been bumped.
|
||||
+ */
|
||||
+ FT_EXPORT( FT_Error )
|
||||
+ FT_Outline_Done_Internal( FT_Memory memory,
|
||||
+ FT_Outline* outline );
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
--- freetype-2.10.0/src/base/ftoutln.c
|
||||
+++ freetype-2.10.0/src/base/ftoutln.c
|
||||
@@ -291,6 +291,19 @@
|
||||
|
||||
/* documentation is in ftoutln.h */
|
||||
|
||||
+ /*
|
||||
+ * Kept downstream for ABI compatibility only.
|
||||
+ * It just throws error now. Remove once soname has been bumped.
|
||||
+ */
|
||||
+ FT_EXPORT_DEF( FT_Error )
|
||||
+ FT_Outline_New_Internal( FT_Memory memory,
|
||||
+ FT_UInt numPoints,
|
||||
+ FT_Int numContours,
|
||||
+ FT_Outline *anoutline )
|
||||
+ {
|
||||
+ return FT_THROW( Unimplemented_Feature );
|
||||
+ }
|
||||
+
|
||||
FT_EXPORT_DEF( FT_Error )
|
||||
FT_Outline_New( FT_Library library,
|
||||
FT_UInt numPoints,
|
||||
@@ -423,6 +436,17 @@
|
||||
|
||||
/* documentation is in ftoutln.h */
|
||||
|
||||
+ /*
|
||||
+ * Kept downstream for ABI compatibility only.
|
||||
+ * It just throws error now. Remove once soname has been bumped.
|
||||
+ */
|
||||
+ FT_EXPORT_DEF( FT_Error )
|
||||
+ FT_Outline_Done_Internal( FT_Memory memory,
|
||||
+ FT_Outline* outline )
|
||||
+ {
|
||||
+ return FT_THROW( Unimplemented_Feature );
|
||||
+ }
|
||||
+
|
||||
FT_EXPORT_DEF( FT_Error )
|
||||
FT_Outline_Done( FT_Library library,
|
||||
FT_Outline* outline )
|
@ -1,13 +0,0 @@
|
||||
diff --git a/include/freetype/ftmodapi.h b/include/freetype/ftmodapi.h
|
||||
index 8d039c4f3..88488bfe8 100644
|
||||
--- a/include/freetype/ftmodapi.h
|
||||
+++ b/include/freetype/ftmodapi.h
|
||||
@@ -623,7 +623,7 @@ FT_BEGIN_HEADER
|
||||
* it is bytecode interpreter's execution context, `TT_ExecContext`,
|
||||
* which is declared in FreeType's internal header file `tttypes.h`.
|
||||
*/
|
||||
- typedef FT_Error
|
||||
+ typedef void
|
||||
(*FT_DebugHook_Func)( void* arg );
|
||||
|
||||
|
@ -1,45 +0,0 @@
|
||||
--- freetype-2.10.4/builds/unix/freetype-config.in
|
||||
+++ freetype-2.10.4/builds/unix/freetype-config.in
|
||||
@@ -32,9 +32,6 @@ cflags=`%PKG_CONFIG% --cflags freetype2`
|
||||
dynamic_libs=`pkgconf --libs freetype2`
|
||||
static_libs=`pkgconf --static --libs freetype2`
|
||||
|
||||
-orig_prefix=$prefix
|
||||
-orig_exec_prefix=$exec_prefix
|
||||
-
|
||||
orig_includedir=$includedir
|
||||
orig_libdir=$libdir
|
||||
|
||||
--- freetype-2.10.4/ft2demos-2.10.4/src/ftbench.c
|
||||
+++ freetype-2.10.4/ft2demos-2.10.4/src/ftbench.c
|
||||
@@ -749,6 +749,7 @@
|
||||
{
|
||||
fprintf( stderr,
|
||||
"couldn't allocate memory to pre-load font file\n" );
|
||||
+ fclose( file );
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -758,9 +759,12 @@
|
||||
fprintf( stderr, "read error\n" );
|
||||
free( memory_file );
|
||||
memory_file = NULL;
|
||||
+ fclose( file );
|
||||
|
||||
return 1;
|
||||
}
|
||||
+
|
||||
+ fclose( file );
|
||||
}
|
||||
|
||||
error = FT_New_Memory_Face( lib,
|
||||
--- freetype-2.10.4/ft2demos-2.10.4/src/ftgrid.c
|
||||
+++ freetype-2.10.4/ft2demos-2.10.4/src/ftgrid.c
|
||||
@@ -662,6 +662,7 @@
|
||||
break;
|
||||
|
||||
default:
|
||||
+ free( t );
|
||||
return;
|
||||
}
|
||||
|
@ -1,18 +1,18 @@
|
||||
--- 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 @@
|
||||
|
||||
# TrueType GX/AAT table validation. Needs `ftgxval.c' below.
|
||||
#
|
||||
# No FT_CONFIG_OPTION_PIC support.
|
||||
-# AUX_MODULES += gxvalid
|
||||
+AUX_MODULES += gxvalid
|
||||
|
||||
# Support for streams compressed with gzip (files with suffix .gz).
|
||||
#
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
# OpenType table validation. Needs `ftotval.c' below.
|
||||
#
|
||||
# No FT_CONFIG_OPTION_PIC support.
|
||||
-# AUX_MODULES += otvalid
|
||||
+AUX_MODULES += otvalid
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
--- 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 @@
|
||||
* When this macro is not defined, FreeType offers alternative LCD
|
||||
* rendering technology that produces excellent output.
|
||||
*/
|
||||
/* rendering technology that produces excellent output without LCD */
|
||||
/* filtering. */
|
||||
/* */
|
||||
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
|
||||
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
/*************************************************************************/
|
||||
|
101
SOURCES/freetype-2.9-ftsmooth.patch
Normal file
101
SOURCES/freetype-2.9-ftsmooth.patch
Normal file
@ -0,0 +1,101 @@
|
||||
--- a/src/smooth/ftsmooth.c
|
||||
+++ b/src/smooth/ftsmooth.c
|
||||
@@ -232,39 +232,13 @@
|
||||
FT_UInt i, j;
|
||||
|
||||
unsigned int height = bitmap->rows;
|
||||
- unsigned int width = bitmap->width;
|
||||
+ unsigned int width = bitmap->width / 3;
|
||||
int pitch = bitmap->pitch;
|
||||
|
||||
-
|
||||
- /* Render 3 separate monochrome bitmaps, shifting the outline */
|
||||
- /* by 1/3 pixel. */
|
||||
- width /= 3;
|
||||
-
|
||||
- bitmap->buffer += width;
|
||||
-
|
||||
- error = render->raster_render( render->raster, ¶ms );
|
||||
- if ( error )
|
||||
- goto Exit;
|
||||
-
|
||||
- FT_Outline_Translate( outline, -21, 0 );
|
||||
- x_shift -= 21;
|
||||
- bitmap->buffer += width;
|
||||
-
|
||||
error = render->raster_render( render->raster, ¶ms );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
- FT_Outline_Translate( outline, 42, 0 );
|
||||
- x_shift += 42;
|
||||
- bitmap->buffer -= 2 * width;
|
||||
-
|
||||
- error = render->raster_render( render->raster, ¶ms );
|
||||
- if ( error )
|
||||
- goto Exit;
|
||||
-
|
||||
- /* XXX: Rearrange the bytes according to FT_PIXEL_MODE_LCD. */
|
||||
- /* XXX: It is more efficient to render every third byte above. */
|
||||
-
|
||||
if ( FT_ALLOC( temp, (FT_ULong)pitch ) )
|
||||
goto Exit;
|
||||
|
||||
@@ -272,11 +246,7 @@
|
||||
{
|
||||
line = bitmap->buffer + i * (FT_ULong)pitch;
|
||||
for ( j = 0; j < width; j++ )
|
||||
- {
|
||||
- temp[3 * j ] = line[j];
|
||||
- temp[3 * j + 1] = line[j + width];
|
||||
- temp[3 * j + 2] = line[j + width + width];
|
||||
- }
|
||||
+ temp[3 * j] = temp[3 * j + 1] = temp[3 * j + 2] = line[j];
|
||||
FT_MEM_COPY( line, temp, pitch );
|
||||
}
|
||||
|
||||
@@ -284,35 +254,23 @@
|
||||
}
|
||||
else if ( vmul ) /* lcd_v */
|
||||
{
|
||||
- int pitch = bitmap->pitch;
|
||||
-
|
||||
+ FT_Byte* line;
|
||||
+ FT_UInt i;
|
||||
+ int original_pitch = bitmap->pitch;
|
||||
|
||||
- /* Render 3 separate monochrome bitmaps, shifting the outline */
|
||||
- /* by 1/3 pixel. Triple the pitch to render on each third row. */
|
||||
bitmap->pitch *= 3;
|
||||
bitmap->rows /= 3;
|
||||
|
||||
- bitmap->buffer += pitch;
|
||||
-
|
||||
- error = render->raster_render( render->raster, ¶ms );
|
||||
- if ( error )
|
||||
- goto Exit;
|
||||
-
|
||||
- FT_Outline_Translate( outline, 0, 21 );
|
||||
- y_shift += 21;
|
||||
- bitmap->buffer += pitch;
|
||||
-
|
||||
error = render->raster_render( render->raster, ¶ms );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
- FT_Outline_Translate( outline, 0, -42 );
|
||||
- y_shift -= 42;
|
||||
- bitmap->buffer -= 2 * pitch;
|
||||
-
|
||||
- error = render->raster_render( render->raster, ¶ms );
|
||||
- if ( error )
|
||||
- goto Exit;
|
||||
+ for ( i = 0; i < bitmap->rows; i++ )
|
||||
+ {
|
||||
+ line = bitmap->buffer + i * bitmap->pitch;
|
||||
+ FT_MEM_COPY( line + original_pitch, line, bitmap->width );
|
||||
+ FT_MEM_COPY( line + 2 * original_pitch, line, bitmap->width );
|
||||
+ }
|
||||
|
||||
bitmap->pitch /= 3;
|
||||
bitmap->rows *= 3;
|
@ -25,19 +25,6 @@ index f9d4d3858..9771c35df 100644
|
||||
face_index--;
|
||||
|
||||
if ( face_index >= face->ttc_header.count )
|
||||
diff --git a/src/sfnt/sfwoff2.c b/src/sfnt/sfwoff2.c
|
||||
index cb1e0664a..165b875e5 100644
|
||||
--- a/src/sfnt/sfwoff2.c
|
||||
+++ b/src/sfnt/sfwoff2.c
|
||||
@@ -2085,7 +2085,7 @@
|
||||
/* Validate requested face index. */
|
||||
*num_faces = woff2.num_fonts;
|
||||
/* value -(N+1) requests information on index N */
|
||||
- if ( *face_instance_index < 0 )
|
||||
+ if ( *face_instance_index < 0 && face_index > 0 )
|
||||
face_index--;
|
||||
|
||||
if ( face_index >= woff2.num_fonts )
|
||||
--
|
||||
2.35.1
|
||||
|
178
SOURCES/freetype-2.9.1-covscan.patch
Normal file
178
SOURCES/freetype-2.9.1-covscan.patch
Normal file
@ -0,0 +1,178 @@
|
||||
--- freetype-2.9.1/builds/unix/freetype-config.in
|
||||
+++ freetype-2.9.1/builds/unix/freetype-config.in
|
||||
@@ -32,9 +32,6 @@ cflags=`%PKG_CONFIG% --cflags freetype2`
|
||||
dynamic_libs=`pkgconf --libs freetype2`
|
||||
static_libs=`pkgconf --static --libs freetype2`
|
||||
|
||||
-orig_prefix=$prefix
|
||||
-orig_exec_prefix=$exec_prefix
|
||||
-
|
||||
orig_includedir=$includedir
|
||||
orig_libdir=$libdir
|
||||
|
||||
--- freetype-2.9.1/ft2demos-2.9.1/src/ftbench.c
|
||||
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftbench.c
|
||||
@@ -749,6 +749,7 @@
|
||||
{
|
||||
fprintf( stderr,
|
||||
"couldn't allocate memory to pre-load font file\n" );
|
||||
+ fclose( file );
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -758,9 +759,12 @@
|
||||
fprintf( stderr, "read error\n" );
|
||||
free( memory_file );
|
||||
memory_file = NULL;
|
||||
+ fclose( file );
|
||||
|
||||
return 1;
|
||||
}
|
||||
+
|
||||
+ fclose( file );
|
||||
}
|
||||
|
||||
error = FT_New_Memory_Face( lib,
|
||||
--- freetype-2.9.1/ft2demos-2.9.1/src/ftchkwd.c
|
||||
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftchkwd.c
|
||||
@@ -118,8 +118,8 @@
|
||||
FT_Library library;
|
||||
|
||||
int i, file_index;
|
||||
- char filename[1024 + 4];
|
||||
- char alt_filename[1024 + 4];
|
||||
+ char filename[1024 + 5];
|
||||
+ char alt_filename[1024 + 5];
|
||||
char* execname;
|
||||
char* fname;
|
||||
|
||||
@@ -169,8 +169,8 @@
|
||||
#ifndef macintosh
|
||||
if ( i >= 0 )
|
||||
{
|
||||
- strncpy( filename + strlen( filename ), ".ttf", 4 );
|
||||
- strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 );
|
||||
+ strncpy( filename + strlen( filename ), ".ttf", 5 );
|
||||
+ strncpy( alt_filename + strlen( alt_filename ), ".ttc", 5 );
|
||||
}
|
||||
#endif
|
||||
|
||||
--- freetype-2.9.1/ft2demos-2.9.1/src/ftcommon.c
|
||||
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftcommon.c
|
||||
@@ -110,7 +110,10 @@
|
||||
|
||||
if ( mode != gr_pixel_mode_gray &&
|
||||
mode != gr_pixel_mode_rgb24 )
|
||||
+ {
|
||||
+ free( display );
|
||||
return NULL;
|
||||
+ }
|
||||
|
||||
grInitDevices();
|
||||
|
||||
--- freetype-2.9.1/ft2demos-2.9.1/src/ftdump.c
|
||||
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftdump.c
|
||||
@@ -775,8 +775,8 @@
|
||||
char* argv[] )
|
||||
{
|
||||
int i, file;
|
||||
- char filename[1024 + 4];
|
||||
- char alt_filename[1024 + 4];
|
||||
+ char filename[1024 + 5];
|
||||
+ char alt_filename[1024 + 5];
|
||||
char* execname;
|
||||
int num_faces;
|
||||
int option;
|
||||
@@ -872,8 +872,8 @@
|
||||
|
||||
if ( i >= 0 )
|
||||
{
|
||||
- strncpy( filename + strlen( filename ), ".ttf", 4 );
|
||||
- strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 );
|
||||
+ strncpy( filename + strlen( filename ), ".ttf", 5 );
|
||||
+ strncpy( alt_filename + strlen( alt_filename ), ".ttc", 5 );
|
||||
}
|
||||
#endif
|
||||
|
||||
--- freetype-2.9.1/ft2demos-2.9.1/src/ftgrid.c
|
||||
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftgrid.c
|
||||
@@ -662,6 +662,7 @@
|
||||
break;
|
||||
|
||||
default:
|
||||
+ free( t );
|
||||
return;
|
||||
}
|
||||
|
||||
--- freetype-2.9.1/ft2demos-2.9.1/src/ftlint.c
|
||||
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftlint.c
|
||||
@@ -62,8 +62,8 @@
|
||||
{
|
||||
int i, file_index;
|
||||
unsigned int id;
|
||||
- char filename[1024 + 4];
|
||||
- char alt_filename[1024 + 4];
|
||||
+ char filename[1024 + 5];
|
||||
+ char alt_filename[1024 + 5];
|
||||
char* execname;
|
||||
char* fname;
|
||||
|
||||
@@ -119,8 +119,8 @@
|
||||
#ifndef macintosh
|
||||
if ( i >= 0 )
|
||||
{
|
||||
- strncpy( filename + strlen( filename ), ".ttf", 4 );
|
||||
- strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 );
|
||||
+ strncpy( filename + strlen( filename ), ".ttf", 5 );
|
||||
+ strncpy( alt_filename + strlen( alt_filename ), ".ttc", 5 );
|
||||
}
|
||||
#endif
|
||||
i = (int)strlen( filename );
|
||||
--- freetype-2.9.1/ft2demos-2.9.1/src/ftmemchk.c
|
||||
+++ freetype-2.9.1/ft2demos-2.9.1/src/ftmemchk.c
|
||||
@@ -227,8 +227,8 @@ int main( int argc, char** argv )
|
||||
{
|
||||
int i, file_index;
|
||||
unsigned int id;
|
||||
- char filename[1024 + 4];
|
||||
- char alt_filename[1024 + 4];
|
||||
+ char filename[1024 + 5];
|
||||
+ char alt_filename[1024 + 5];
|
||||
char* execname;
|
||||
char* fname;
|
||||
|
||||
@@ -270,8 +270,8 @@ int main( int argc, char** argv )
|
||||
#ifndef macintosh
|
||||
if ( i >= 0 )
|
||||
{
|
||||
- strncpy( filename + strlen( filename ), ".ttf", 4 );
|
||||
- strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 );
|
||||
+ strncpy( filename + strlen( filename ), ".ttf", 5 );
|
||||
+ strncpy( alt_filename + strlen( alt_filename ), ".ttc", 5 );
|
||||
}
|
||||
#endif
|
||||
i = strlen( filename );
|
||||
--- freetype-2.9.1/ft2demos-2.9.1/src/fttimer.c
|
||||
+++ freetype-2.9.1/ft2demos-2.9.1/src/fttimer.c
|
||||
@@ -162,8 +162,8 @@
|
||||
char** argv )
|
||||
{
|
||||
int i, total, base, rendered_glyphs;
|
||||
- char filename[1024 + 4];
|
||||
- char alt_filename[1024 + 4];
|
||||
+ char filename[1024 + 5];
|
||||
+ char alt_filename[1024 + 5];
|
||||
|
||||
long t, t0, tz0;
|
||||
|
||||
@@ -230,8 +230,8 @@
|
||||
|
||||
if ( i >= 0 )
|
||||
{
|
||||
- strncpy( filename + strlen( filename ), ".ttf", 4 );
|
||||
- strncpy( alt_filename + strlen( alt_filename ), ".ttc", 4 );
|
||||
+ strncpy( filename + strlen( filename ), ".ttf", 5 );
|
||||
+ strncpy( alt_filename + strlen( alt_filename ), ".ttc", 5 );
|
||||
}
|
||||
|
||||
/* Initialize engine */
|
48
SOURCES/freetype-2.9.1-png-bitmap-size.patch
Normal file
48
SOURCES/freetype-2.9.1-png-bitmap-size.patch
Normal file
@ -0,0 +1,48 @@
|
||||
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: [PATCH] [sfnt] Fix heap buffer overflow (#59308).
|
||||
|
||||
This is CVE-2020-15999.
|
||||
|
||||
* src/sfnt/pngshim.c (Load_SBit_Png): Test bitmap size earlier.
|
||||
---
|
||||
ChangeLog | 8 ++++++++
|
||||
src/sfnt/pngshim.c | 14 +++++++-------
|
||||
2 files changed, 15 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/sfnt/pngshim.c b/src/sfnt/pngshim.c
|
||||
index 2e64e5846..f55016122 100644
|
||||
--- a/src/sfnt/pngshim.c
|
||||
+++ b/src/sfnt/pngshim.c
|
||||
@@ -332,6 +332,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;
|
||||
|
||||
@@ -340,13 +347,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.26.2
|
||||
|
@ -11,21 +11,6 @@ event that the call to `png_read_image` fails and calls `longjmp`.
|
||||
src/sfnt/pngshim.c | 1 +
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/ChangeLog b/ChangeLog
|
||||
index 42f7c34ba..ff048b8ab 100644
|
||||
--- a/ChangeLog
|
||||
+++ b/ChangeLog
|
||||
@@ -1,3 +1,10 @@
|
||||
+2020-10-23 Ben Wagner <bungeman@google.com>
|
||||
+
|
||||
+ * src/sfnt/pngshim.c (Load_SBit_Png): Fix memory leak (#59322).
|
||||
+
|
||||
+ The issue is that `rows` is allocated but will not be freed in the
|
||||
+ event that the call to `png_read_image` fails and calls `longjmp`.
|
||||
+
|
||||
2020-10-20 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* Version 2.10.4 released.
|
||||
diff --git a/src/sfnt/pngshim.c b/src/sfnt/pngshim.c
|
||||
index f55016122..d4e43a9f4 100644
|
||||
--- a/src/sfnt/pngshim.c
|
20
SOURCES/freetype-2.9.1-windres.patch
Normal file
20
SOURCES/freetype-2.9.1-windres.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- freetype-2.9.1/builds/unix/configure
|
||||
+++ freetype-2.9.1/builds/unix/configure
|
||||
@@ -11853,6 +11853,8 @@ CC=$lt_save_CC
|
||||
# Only expand once:
|
||||
|
||||
|
||||
+if false
|
||||
+then :
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}windres; ac_word=$2
|
||||
@@ -12022,6 +12025,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
CC=$lt_save_CC
|
||||
CFLAGS=$lt_save_CFLAGS
|
||||
|
||||
+fi
|
||||
+
|
||||
|
||||
|
||||
# checks for native programs to generate building tool
|
@ -1,19 +1,19 @@
|
||||
%{!?with_xfree86:%define with_xfree86 1}
|
||||
%bcond_with bootstrap
|
||||
|
||||
Summary: A free and portable font rendering engine
|
||||
Name: freetype
|
||||
Version: 2.10.4
|
||||
Version: 2.9.1
|
||||
Release: 9%{?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
|
||||
Source: http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.xz
|
||||
Source1: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.xz
|
||||
Source2: http://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.xz
|
||||
Source: http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.bz2
|
||||
Source1: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.bz2
|
||||
Source2: http://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.bz2
|
||||
Source3: ftconfig.h
|
||||
|
||||
# Enable subpixel rendering (ClearType)
|
||||
Patch0: freetype-2.3.0-enable-spr.patch
|
||||
|
||||
# Enable otvalid and gxvalid modules
|
||||
Patch1: freetype-2.2.1-enable-valid.patch
|
||||
# Enable additional demos
|
||||
@ -23,38 +23,33 @@ Patch3: freetype-2.6.5-libtool.patch
|
||||
|
||||
Patch4: freetype-2.8-multilib.patch
|
||||
|
||||
Patch5: freetype-2.10.0-internal-outline.patch
|
||||
# Revert ABI/API change
|
||||
Patch6: freetype-2.10.1-debughook.patch
|
||||
Patch5: freetype-2.9-ftsmooth.patch
|
||||
|
||||
Patch7: freetype-2.10.4-png-memory-leak.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1602501
|
||||
Patch6: freetype-2.9.1-covscan.patch
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1964066
|
||||
Patch8: freetype-2.10.4-covscan.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1890210
|
||||
Patch7: freetype-2.9.1-png-bitmap-size.patch
|
||||
Patch8: freetype-2.9.1-png-memory-leak.patch
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2077989
|
||||
Patch9: freetype-2.10.4-avoid-invalid-face-index.patch
|
||||
Patch9: freetype-2.9.1-avoid-invalid-face-index.patch
|
||||
Patch10: freetype-2.9.1-windres.patch
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2077991
|
||||
Patch10: freetype-2.10.4-properly-guard-face_index.patch
|
||||
Patch11: freetype-2.9.1-properly-guard-face-index.patch
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2077985
|
||||
Patch11: freetype-2.10.4-guard-face-size.patch
|
||||
Patch12: freetype-2.9.1-guard-face-size.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libX11-devel
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: bzip2-devel
|
||||
BuildRequires: brotli-devel
|
||||
BuildRequires: make
|
||||
%if %{without bootstrap}
|
||||
BuildRequires: harfbuzz-devel
|
||||
%endif
|
||||
|
||||
Provides: %{name}-bytecode
|
||||
Provides: %{name}-subpixel
|
||||
Obsoletes: freetype-freeworld < 2.9.1-2
|
||||
Obsoletes: freetype-freeworld
|
||||
|
||||
%description
|
||||
The FreeType engine is a free and portable font rendering
|
||||
@ -67,6 +62,7 @@ text-rendering library.
|
||||
|
||||
%package demos
|
||||
Summary: A collection of FreeType demos
|
||||
Group: System Environment/Libraries
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description demos
|
||||
@ -78,6 +74,7 @@ small utilities showing various capabilities of the FreeType library.
|
||||
|
||||
%package devel
|
||||
Summary: FreeType development libraries and header files
|
||||
Group: Development/Libraries
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: pkgconf%{?_isa}
|
||||
|
||||
@ -101,13 +98,14 @@ popd
|
||||
|
||||
%patch3 -p1 -b .libtool
|
||||
%patch4 -p1 -b .multilib
|
||||
%patch5 -p1 -b .internal-outline
|
||||
%patch6 -p1 -b .debughook
|
||||
%patch7 -p1 -b .png-memory-leak
|
||||
%patch8 -p1 -b .covscan
|
||||
%patch5 -p1 -b .ftsmooth
|
||||
%patch6 -p1 -b .covscan
|
||||
%patch7 -p1 -b .png-bitmap-size
|
||||
%patch8 -p1 -b .png-memory-leak
|
||||
%patch9 -p1 -b .avoid-invalid-face-index
|
||||
%patch10 -p1 -b .properly-guard-face_index
|
||||
%patch11 -p1 -b .guard-face-size
|
||||
%patch10 -p1 -b .windres
|
||||
%patch11 -p1 -b .properly-guard-face-index
|
||||
%patch12 -p1 -b .guard-face-size
|
||||
|
||||
%build
|
||||
|
||||
@ -116,15 +114,10 @@ popd
|
||||
--with-bzip2=yes \
|
||||
--with-png=yes \
|
||||
--enable-freetype-config \
|
||||
%if %{without bootstrap}
|
||||
--with-harfbuzz=yes \
|
||||
%else
|
||||
--with-harfbuzz=no \
|
||||
%endif
|
||||
--with-brotli=yes
|
||||
--with-harfbuzz=no
|
||||
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' builds/unix/libtool
|
||||
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' builds/unix/libtool
|
||||
%make_build
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%if %{with_xfree86}
|
||||
# Build demos
|
||||
@ -150,7 +143,7 @@ popd
|
||||
%make_install gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale
|
||||
|
||||
{
|
||||
for ftdemo in ftbench ftchkwd ftmemchk ftpatchk fttimer ftdump ftlint ftvalid ; do
|
||||
for ftdemo in ftbench ftchkwd ftmemchk ftpatchk fttimer ftdump ftlint ftmemchk ftvalid ; do
|
||||
builds/unix/libtool --mode=install install -m 755 ft2demos-%{version}/bin/$ftdemo $RPM_BUILD_ROOT/%{_bindir}
|
||||
done
|
||||
}
|
||||
@ -162,20 +155,6 @@ popd
|
||||
}
|
||||
%endif
|
||||
|
||||
# man pages for freetype-demos
|
||||
{
|
||||
for ftdemo in ftbench ftdump ftlint ftvalid ; do
|
||||
builds/unix/libtool --mode=install install -m 644 ft2demos-%{version}/man/${ftdemo}.1 $RPM_BUILD_ROOT/%{_mandir}/man1
|
||||
done
|
||||
}
|
||||
%if %{with_xfree86}
|
||||
{
|
||||
for ftdemo in ftdiff ftgamma ftgrid ftmulti ftstring ftview ; do
|
||||
builds/unix/libtool --mode=install install -m 644 ft2demos-%{version}/man/${ftdemo}.1 $RPM_BUILD_ROOT/%{_mandir}/man1
|
||||
done
|
||||
}
|
||||
%endif
|
||||
|
||||
# fix multilib issues
|
||||
%define wordsize %{__isa_bits}
|
||||
|
||||
@ -214,10 +193,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
|
||||
%{_bindir}/ftdump
|
||||
%{_bindir}/ftlint
|
||||
%{_bindir}/ftvalid
|
||||
%{_mandir}/man1/ftbench.1.gz
|
||||
%{_mandir}/man1/ftdump.1.gz
|
||||
%{_mandir}/man1/ftlint.1.gz
|
||||
%{_mandir}/man1/ftvalid.1.gz
|
||||
%if %{with_xfree86}
|
||||
%{_bindir}/ftdiff
|
||||
%{_bindir}/ftgamma
|
||||
@ -225,12 +200,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
|
||||
%{_bindir}/ftmulti
|
||||
%{_bindir}/ftstring
|
||||
%{_bindir}/ftview
|
||||
%{_mandir}/man1/ftdiff.1.gz
|
||||
%{_mandir}/man1/ftgamma.1.gz
|
||||
%{_mandir}/man1/ftgrid.1.gz
|
||||
%{_mandir}/man1/ftmulti.1.gz
|
||||
%{_mandir}/man1/ftstring.1.gz
|
||||
%{_mandir}/man1/ftview.1.gz
|
||||
%endif
|
||||
%doc ChangeLog README
|
||||
|
||||
@ -249,110 +218,43 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Tue May 31 2022 Marek Kasik <mkasik@redhat.com> - 2.10.4-9
|
||||
* Fri May 27 2022 Marek Kasik <mkasik@redhat.com> - 2.9.1-9
|
||||
- Guard face->size
|
||||
- Resolves: #2079280
|
||||
- Resolves: #2079279
|
||||
|
||||
* Mon May 30 2022 Marek Kasik <mkasik@redhat.com> - 2.10.4-8
|
||||
* Thu May 26 2022 Marek Kasik <mkasik@redhat.com> - 2.9.1-8
|
||||
- Properly guard "face_index"
|
||||
- Resolves: #2079262
|
||||
- Resolves: #2079261
|
||||
|
||||
* Thu May 26 2022 Marek Kasik <mkasik@redhat.com> - 2.10.4-7
|
||||
* Thu May 26 2022 Marek Kasik <mkasik@redhat.com> - 2.9.1-7
|
||||
- Do not search for windres
|
||||
- Resolves: #2079270
|
||||
|
||||
* Wed May 25 2022 Marek Kasik <mkasik@redhat.com> - 2.9.1-6
|
||||
- Avoid invalid face index
|
||||
- Resolves: #2079271
|
||||
- Resolves: #2079270
|
||||
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.10.4-6
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
||||
* Wed May 26 2021 Marek Kasik <mkasik@redhat.com> - 2.10.4-5
|
||||
- Backport fixes for issues found by Coverity scan
|
||||
- Resolves: #1964066
|
||||
|
||||
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 2.10.4-4
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
* Fri Feb 5 2021 Akira TAGOH <tagoh@redhat.com> - 2.10.4-3
|
||||
- Enable HarfBuzz support
|
||||
- Add bootstrap without HarfBuzz
|
||||
- Resolves: #1853937
|
||||
- Resolves: #1906714
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.4-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Fri Oct 23 2020 Marek Kasik <mkasik@redhat.com> - 2.10.4-1
|
||||
- Update to 2.10.4
|
||||
* Thu Nov 5 2020 Marek Kasik <mkasik@redhat.com> - 2.9.1-5
|
||||
- Test bitmap size earlier for PNGs
|
||||
- Fix memory leak in pngshim.c
|
||||
- Enable man pages for demos
|
||||
- Resolves: #1887084, #1890211
|
||||
- Resolves: #1891906
|
||||
|
||||
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
* Fri Dec 7 2018 Marek Kasik <mkasik@redhat.com> - 2.9.1-4
|
||||
- Use pkgconf in freetype-config.in directly (RPMDiff)
|
||||
- Related: #1651252
|
||||
|
||||
* Tue Jul 21 2020 Tom Stellard <tstellar@redhat.com> - 2.10.2-2
|
||||
- Use make macros
|
||||
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
|
||||
* Fri Dec 7 2018 Marek Kasik <mkasik@redhat.com> - 2.9.1-3
|
||||
- Enable ClearType subpixel rendering
|
||||
- Resolves: #1651252
|
||||
|
||||
* Wed Jul 15 2020 Marek Kasik <mkasik@redhat.com> - 2.10.2-1
|
||||
- Update to 2.10.2
|
||||
- Enable support for WOFF2 streams
|
||||
- Resolves: #1725983
|
||||
* Thu Sep 6 2018 Marek Kasik <mkasik@redhat.com> - 2.9.1-2
|
||||
- Fix important issues found by covscan
|
||||
- Resolves: #1602501
|
||||
|
||||
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Sat Oct 12 2019 Michael Kuhn <suraia@fedoraproject.org> - 2.10.1-1
|
||||
- Update to 2.10.1
|
||||
- Revert FT_DebugHook_Func ABI/API changes
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Tue Jun 11 09:42:57 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.10.0-2
|
||||
- Fix handling of undefined glyph [pcf]
|
||||
|
||||
* Tue May 28 2019 Marek Kasik <mkasik@redhat.com> - 2.10.0-1
|
||||
- Update to 2.10.0
|
||||
- Keep FT_Outline_New_Internal() and FT_Outline_Done_Internal()
|
||||
- for ABI compatibility but make them just throw
|
||||
- Unimplemented_Feature error.
|
||||
- Remove them once soname has been bumped!
|
||||
- Resolves: #1689117
|
||||
|
||||
* Mon Apr 8 2019 Marek Kasik <mkasik@redhat.com> - 2.9.1-8
|
||||
- Remove freetype-2.9-ftsmooth.patch
|
||||
|
||||
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.1-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Wed Oct 31 2018 Marek Kasik <mkasik@redhat.com> - 2.9.1-6
|
||||
- Obsolete freetype-freeworld
|
||||
- Resolves: #1644700
|
||||
|
||||
* Wed Oct 31 2018 Neal Gompa <ngompa13@gmail.com> - 2.9.1-5
|
||||
- Correctly enable subpixel rendering for ClearType functionality
|
||||
|
||||
* Mon Oct 29 2018 Marek Kasik <mkasik@redhat.com> - 2.9.1-4
|
||||
- Enable ClearType code thanks to Microsoft joining OIN
|
||||
|
||||
* Fri Oct 19 2018 Marek Kasik <mkasik@redhat.com> - 2.9.1-3
|
||||
- Use 'pkgconf' directly for multilib reasons
|
||||
- Resolves: #1639379
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Fri May 25 2018 Marek Kasik <mkasik@redhat.com> - 2.9.1-1
|
||||
* Wed Jun 27 2018 Marek Kasik <mkasik@redhat.com> - 2.9.1-1
|
||||
- Update to 2.9.1
|
||||
- Modify/remove patches as needed
|
||||
- Resolves: #1574125
|
||||
|
||||
* Tue Mar 20 2018 Marek Kasik <mkasik@redhat.com> - 2.9-1
|
||||
- Update to 2.9
|
||||
- Add/modify/remove patches as needed
|
||||
- Resolves: #1492372
|
||||
- Modify/remove/add patches as needed
|
||||
- Resolves: #1595787
|
||||
|
||||
* Fri Feb 16 2018 Marek Kasik <mkasik@redhat.com> - 2.8-10
|
||||
- Avoid NULL reference
|
||||
|
Loading…
Reference in New Issue
Block a user