Compare commits
No commits in common. 'c9' and 'c8' have entirely different histories.
@ -1,3 +1,3 @@
|
||||
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
|
||||
220c82062171c513e4017c523d196933c9de4a7d SOURCES/freetype-2.9.1.tar.bz2
|
||||
bb6c973f9fef972ad4ecc03bc09ed676b8dc0d59 SOURCES/freetype-doc-2.9.1.tar.bz2
|
||||
45704d7b75c4f9fdd6a9b3787918e8220b36aa77 SOURCES/ft2demos-2.9.1.tar.bz2
|
||||
|
@ -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,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
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
/*************************************************************************/
|
||||
|
@ -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;
|
@ -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 */
|
@ -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
|
||||
|
@ -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
|
Loading…
Reference in new issue