commit
2530b971f7
@ -0,0 +1,3 @@
|
||||
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
|
@ -0,0 +1,3 @@
|
||||
SOURCES/freetype-2.9.1.tar.bz2
|
||||
SOURCES/freetype-doc-2.9.1.tar.bz2
|
||||
SOURCES/ft2demos-2.9.1.tar.bz2
|
@ -0,0 +1,20 @@
|
||||
--- 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
|
||||
|
||||
# Auxiliary PostScript driver component to share common code.
|
||||
#
|
@ -0,0 +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 @@
|
||||
/* rendering technology that produces excellent output without LCD */
|
||||
/* filtering. */
|
||||
/* */
|
||||
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
|
||||
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
|
||||
|
||||
|
||||
/*************************************************************************/
|
@ -0,0 +1,17 @@
|
||||
--- ft2demos-2.5.2/Makefile
|
||||
+++ ft2demos-2.5.2/Makefile
|
||||
@@ -296,10 +296,10 @@ else
|
||||
# The following programs are not compiled automatically; either comment
|
||||
# out the affected line or use the program name as a Makefile target.
|
||||
#
|
||||
- # EXES += ftchkwd
|
||||
- # EXES += ftmemchk
|
||||
- # EXES += ftpatchk
|
||||
- # EXES += fttimer
|
||||
+ EXES += ftchkwd
|
||||
+ EXES += ftmemchk
|
||||
+ EXES += ftpatchk
|
||||
+ EXES += fttimer
|
||||
# EXES += testname
|
||||
|
||||
exes: $(EXES:%=$(BIN_DIR_2)/%$E)
|
@ -0,0 +1,11 @@
|
||||
--- 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
|
||||
fi
|
||||
|
||||
if test "$echo_libtool" = "yes" ; then
|
||||
- echo ${SYSROOT}$libdir/libfreetype.la
|
||||
+ echo ""
|
||||
fi
|
||||
|
||||
# EOF
|
@ -0,0 +1,65 @@
|
||||
--- freetype-2.9/builds/unix/freetype-config.in
|
||||
+++ freetype-2.9/builds/unix/freetype-config.in
|
||||
@@ -13,45 +13,25 @@ LC_ALL=C
|
||||
export LC_ALL
|
||||
|
||||
|
||||
-# if `pkg-config' is available, use values from `freetype2.pc'
|
||||
-%PKG_CONFIG% --atleast-pkgconfig-version 0.24 >/dev/null 2>&1
|
||||
-if test $? -eq 0 ; then
|
||||
- # note that option `--variable' is not affected by the
|
||||
- # PKG_CONFIG_SYSROOT_DIR environment variable
|
||||
- if test "x$SYSROOT" != "x" ; then
|
||||
- PKG_CONFIG_SYSROOT_DIR="$SYSROOT"
|
||||
- export PKG_CONFIG_SYSROOT_DIR
|
||||
- fi
|
||||
-
|
||||
- prefix=`%PKG_CONFIG% --variable prefix freetype2`
|
||||
- exec_prefix=`%PKG_CONFIG% --variable exec_prefix freetype2`
|
||||
-
|
||||
- includedir=`%PKG_CONFIG% --variable includedir freetype2`
|
||||
- libdir=`%PKG_CONFIG% --variable libdir freetype2`
|
||||
-
|
||||
- version=`%PKG_CONFIG% --modversion freetype2`
|
||||
-
|
||||
- cflags=`%PKG_CONFIG% --cflags freetype2`
|
||||
- dynamic_libs=`%PKG_CONFIG% --libs freetype2`
|
||||
- static_libs=`%PKG_CONFIG% --static --libs freetype2`
|
||||
-else
|
||||
- prefix="%prefix%"
|
||||
- exec_prefix="%exec_prefix%"
|
||||
-
|
||||
- includedir="%includedir%"
|
||||
- libdir="%libdir%"
|
||||
-
|
||||
- version=%ft_version%
|
||||
-
|
||||
- cflags="-I${SYSROOT}$includedir/freetype2"
|
||||
- dynamic_libs="-lfreetype"
|
||||
- static_libs="%LIBSSTATIC_CONFIG%"
|
||||
- if test "${SYSROOT}$libdir" != "/usr/lib" &&
|
||||
- test "${SYSROOT}$libdir" != "/usr/lib64" ; then
|
||||
- libs_L="-L${SYSROOT}$libdir"
|
||||
- fi
|
||||
+# note that option `--variable' is not affected by the
|
||||
+# PKG_CONFIG_SYSROOT_DIR environment variable
|
||||
+if test "x$SYSROOT" != "x" ; then
|
||||
+ PKG_CONFIG_SYSROOT_DIR="$SYSROOT"
|
||||
+ export PKG_CONFIG_SYSROOT_DIR
|
||||
fi
|
||||
|
||||
+prefix=`pkgconf --variable prefix freetype2`
|
||||
+exec_prefix=`pkgconf --variable exec_prefix freetype2`
|
||||
+
|
||||
+includedir=`pkgconf --variable includedir freetype2`
|
||||
+libdir=`pkgconf --variable libdir freetype2`
|
||||
+
|
||||
+version=`pkgconf --modversion freetype2`
|
||||
+
|
||||
+cflags=`pkgconf --cflags freetype2`
|
||||
+dynamic_libs=`pkgconf --libs freetype2`
|
||||
+static_libs=`pkgconf --static --libs freetype2`
|
||||
+
|
||||
orig_prefix=$prefix
|
||||
orig_exec_prefix=$exec_prefix
|
||||
|
@ -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,30 @@
|
||||
From 53dfdcd8198d2b3201a23c4bad9190519ba918db Mon Sep 17 00:00:00 2001
|
||||
From: Werner Lemberg <wl@gnu.org>
|
||||
Date: Thu, 17 Mar 2022 19:24:16 +0100
|
||||
Subject: [PATCH] [sfnt] Avoid invalid face index.
|
||||
|
||||
Fixes #1138.
|
||||
|
||||
* src/sfnt/sfobjs.c (sfnt_init_face), src/sfnt/sfwoff2.c (woff2_open_font):
|
||||
Check `face_index` before decrementing.
|
||||
---
|
||||
src/sfnt/sfobjs.c | 2 +-
|
||||
src/sfnt/sfwoff2.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
|
||||
index f9d4d3858..9771c35df 100644
|
||||
--- a/src/sfnt/sfobjs.c
|
||||
+++ b/src/sfnt/sfobjs.c
|
||||
@@ -566,7 +566,7 @@
|
||||
face_index = FT_ABS( face_instance_index ) & 0xFFFF;
|
||||
|
||||
/* 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 >= face->ttc_header.count )
|
||||
--
|
||||
2.35.1
|
||||
|
@ -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,27 @@
|
||||
From 0c2bdb01a2e1d24a3e592377a6d0822856e10df2 Mon Sep 17 00:00:00 2001
|
||||
From: Werner Lemberg <wl@gnu.org>
|
||||
Date: Sat, 19 Mar 2022 09:37:28 +0100
|
||||
Subject: [PATCH] * src/base/ftobjs.c (FT_Request_Size): Guard `face->size`.
|
||||
|
||||
Fixes #1140.
|
||||
---
|
||||
src/base/ftobjs.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
|
||||
index 6492a1517..282c9121a 100644
|
||||
--- a/src/base/ftobjs.c
|
||||
+++ b/src/base/ftobjs.c
|
||||
@@ -3409,6 +3409,9 @@
|
||||
if ( !face )
|
||||
return FT_THROW( Invalid_Face_Handle );
|
||||
|
||||
+ if ( !face->size )
|
||||
+ return FT_THROW( Invalid_Size_Handle );
|
||||
+
|
||||
if ( !req || req->width < 0 || req->height < 0 ||
|
||||
req->type >= FT_SIZE_REQUEST_TYPE_MAX )
|
||||
return FT_THROW( Invalid_Argument );
|
||||
--
|
||||
2.35.1
|
||||
|
@ -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,28 @@
|
||||
From 007c109b4594c5e63948bd08b4d5011ad76ffb10 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Wagner <bungeman@google.com>
|
||||
Date: Fri, 23 Oct 2020 08:29:14 +0200
|
||||
Subject: [PATCH] * 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`.
|
||||
---
|
||||
ChangeLog | 7 +++++++
|
||||
src/sfnt/pngshim.c | 1 +
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/sfnt/pngshim.c b/src/sfnt/pngshim.c
|
||||
index f55016122..d4e43a9f4 100644
|
||||
--- a/src/sfnt/pngshim.c
|
||||
+++ b/src/sfnt/pngshim.c
|
||||
@@ -443,6 +443,7 @@
|
||||
png_read_end( png, info );
|
||||
|
||||
DestroyExit:
|
||||
+ FT_FREE( rows );
|
||||
png_destroy_read_struct( &png, &info, NULL );
|
||||
FT_Stream_Close( &stream );
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
@ -0,0 +1,46 @@
|
||||
From 22a0cccb4d9d002f33c1ba7a4b36812c7d4f46b5 Mon Sep 17 00:00:00 2001
|
||||
From: Werner Lemberg <wl@gnu.org>
|
||||
Date: Sat, 19 Mar 2022 06:40:17 +0100
|
||||
Subject: [PATCH] * src/base/ftobjs.c (ft_open_face_internal): Properly guard
|
||||
`face_index`.
|
||||
|
||||
We must ensure that the cast to `FT_Int` doesn't change the sign.
|
||||
|
||||
Fixes #1139.
|
||||
---
|
||||
src/base/ftobjs.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
From d014387ad4a5dd04d8e7f99587c7dacb70261924 Mon Sep 17 00:00:00 2001
|
||||
From: Werner Lemberg <wl@gnu.org>
|
||||
Date: Sat, 19 Mar 2022 09:30:45 +0100
|
||||
Subject: [PATCH 2/2] * src/base/ftobjs.c (ft_open_face_internal): Thinko.
|
||||
|
||||
---
|
||||
src/base/ftobjs.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
|
||||
index 2c0f0e6c9..10952a6c6 100644
|
||||
--- a/src/base/ftobjs.c
|
||||
+++ b/src/base/ftobjs.c
|
||||
@@ -2527,6 +2527,16 @@
|
||||
#endif
|
||||
|
||||
|
||||
+ /* only use lower 31 bits together with sign bit */
|
||||
+ if ( face_index > 0 )
|
||||
+ face_index &= 0x7FFFFFFFL;
|
||||
+ else
|
||||
+ {
|
||||
+ face_index = -face_index;
|
||||
+ face_index &= 0x7FFFFFFFL;
|
||||
+ face_index = -face_index;
|
||||
+ }
|
||||
+
|
||||
#ifdef FT_DEBUG_LEVEL_TRACE
|
||||
FT_TRACE3(( "FT_Open_Face: " ));
|
||||
if ( face_index < 0 )
|
||||
--
|
||||
2.35.1
|
||||
|
@ -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
|
@ -0,0 +1,14 @@
|
||||
#ifndef __FTCONFIG_H__MULTILIB
|
||||
#define __FTCONFIG_H__MULTILIB
|
||||
|
||||
#include <bits/wordsize.h>
|
||||
|
||||
#if __WORDSIZE == 32
|
||||
# include "ftconfig-32.h"
|
||||
#elif __WORDSIZE == 64
|
||||
# include "ftconfig-64.h"
|
||||
#else
|
||||
# error "unexpected value for __WORDSIZE macro"
|
||||
#endif
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue