ref: e261f426d608d8255dc34793bccda6a2a0915229
parent: 9950adcc11cf94b7d42d236e07fb2be0fb0a695b
author: Suzuki, Toshiya (鈴木俊哉) <[email protected]>
date: Tue Aug 15 13:00:43 EDT 2006
* src/otvalid/otvmod.c, src/gxvalid/gxvmod.c: replace ft_validator_run by ft_setjmp
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-08-15 suzuki toshiya <[email protected]>
+
+ `ft_validator_run' wrapping `setjmp' can cause crash, found by Jens:
+ http://lists.nongnu.org/archive/html/freetype-devel/2006-08/msg00004.htm
+
+ * freetype2/src/otvalid/otvmod.c: replace `ft_validator_run' by
+ `ft_setjmp'. It reverts the change introduced on 2005-08-20.
+
+ * freetype2/src/gxvalid/gxvmod.c: Ditto.
+
2006-08-13 Jens Claudius <[email protected]>
* freetype2/include/freetype/internal/psaux.h: (enum T1_TokenType_):
--- a/src/gxvalid/gxvmod.c
+++ b/src/gxvalid/gxvmod.c
@@ -91,7 +91,7 @@
{ \
ft_validator_init( &valid, _sfnt, _sfnt + len_ ## _sfnt, \
FT_VALIDATE_DEFAULT ); \
- if ( ft_validator_run( &valid ) == 0 ) \
+ if ( ft_setjmp( valid.jump_buffer ) == 0 ) \
gxv_ ## _sfnt ## _validate( _sfnt, face, &valid ); \
error = valid.error; \
if ( error ) \
@@ -210,7 +210,7 @@
{
ft_validator_init( &valid, ckern, ckern + len_ckern,
FT_VALIDATE_DEFAULT );
- if ( ft_validator_run( &valid ) == 0 )
+ if ( ft_setjmp( valid.jump_buffer ) == 0 )
gxv_kern_validate_classic( ckern, face,
ckern_flags & FT_VALIDATE_CKERN, &valid );
error = valid.error;
--- a/src/otvalid/otvmod.c
+++ b/src/otvalid/otvmod.c
@@ -124,7 +124,7 @@
if ( base )
{
ft_validator_init( &valid, base, base + len_base, FT_VALIDATE_DEFAULT );
- if ( ft_validator_run( &valid ) == 0 )
+ if ( ft_setjmp( valid.jump_buffer ) == 0 )
otv_BASE_validate( base, &valid );
error = valid.error;
if ( error )
@@ -134,7 +134,7 @@
if ( gpos )
{
ft_validator_init( &valid, gpos, gpos + len_gpos, FT_VALIDATE_DEFAULT );
- if ( ft_validator_run( &valid ) == 0 )
+ if ( ft_setjmp( valid.jump_buffer ) == 0 )
otv_GPOS_validate( gpos, face->num_glyphs, &valid );
error = valid.error;
if ( error )
@@ -144,7 +144,7 @@
if ( gsub )
{
ft_validator_init( &valid, gsub, gsub + len_gsub, FT_VALIDATE_DEFAULT );
- if ( ft_validator_run( &valid ) == 0 )
+ if ( ft_setjmp( valid.jump_buffer ) == 0 )
otv_GSUB_validate( gsub, face->num_glyphs, &valid );
error = valid.error;
if ( error )
@@ -154,7 +154,7 @@
if ( gdef )
{
ft_validator_init( &valid, gdef, gdef + len_gdef, FT_VALIDATE_DEFAULT );
- if ( ft_validator_run( &valid ) == 0 )
+ if ( ft_setjmp( valid.jump_buffer ) == 0 )
otv_GDEF_validate( gdef, gsub, gpos, &valid );
error = valid.error;
if ( error )
@@ -164,7 +164,7 @@
if ( jstf )
{
ft_validator_init( &valid, jstf, jstf + len_jstf, FT_VALIDATE_DEFAULT );
- if ( ft_validator_run( &valid ) == 0 )
+ if ( ft_setjmp( valid.jump_buffer ) == 0 )
otv_JSTF_validate( jstf, gsub, gpos, face->num_glyphs, &valid );
error = valid.error;
if ( error )