summaryrefslogtreecommitdiffstats
path: root/src/psaux
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2011-01-26 13:53:40 +0100
committerDavid 'Digit' Turner <digit@google.com>2011-01-26 13:53:40 +0100
commit7f08cbd7d6dcf19b8d8e4328e33032aee342e3b4 (patch)
treef9ed9e041d6830735eae3d4af62e9a602851faea /src/psaux
parentcb487e4c5295d0d9bb96ddd3a27372ffad41ae5b (diff)
downloadandroid_external_freetype-7f08cbd7d6dcf19b8d8e4328e33032aee342e3b4.tar.gz
android_external_freetype-7f08cbd7d6dcf19b8d8e4328e33032aee342e3b4.tar.bz2
android_external_freetype-7f08cbd7d6dcf19b8d8e4328e33032aee342e3b4.zip
Upgrade to upstream 2.4.4
This is necessary to fix several security issues. See b/3344697 Change-Id: Ica5c6387fbd791008199f7994ed03978ed700a69
Diffstat (limited to 'src/psaux')
-rw-r--r--src/psaux/t1decode.c75
1 files changed, 39 insertions, 36 deletions
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index babf3ba..ea31c51 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -373,15 +373,6 @@
#endif
- /* we don't want to touch the source code -- use macro trick */
-#define start_point t1_builder_start_point
-#define check_points t1_builder_check_points
-#define add_point t1_builder_add_point
-#define add_point1 t1_builder_add_point1
-#define add_contour t1_builder_add_contour
-#define close_contour t1_builder_close_contour
-
-
/* compute random seed from stack address of parameter */
seed = (FT_Fixed)( ( (FT_PtrDist)(char*)&seed ^
(FT_PtrDist)(char*)&decoder ^
@@ -739,8 +730,10 @@
decoder->flex_state = 1;
decoder->num_flex_vectors = 0;
- if ( start_point( builder, x, y ) ||
- check_points( builder, 6 ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok ||
+ ( error = t1_builder_check_points( builder, 6 ) )
+ != PSaux_Err_Ok )
goto Fail;
break;
@@ -757,10 +750,10 @@
/* point without adding any point to the outline */
idx = decoder->num_flex_vectors++;
if ( idx > 0 && idx < 7 )
- add_point( builder,
- x,
- y,
- (FT_Byte)( idx == 3 || idx == 6 ) );
+ t1_builder_add_point( builder,
+ x,
+ y,
+ (FT_Byte)( idx == 3 || idx == 6 ) );
}
break;
@@ -1077,7 +1070,7 @@
case op_endchar:
FT_TRACE4(( " endchar\n" ));
- close_contour( builder );
+ t1_builder_close_contour( builder );
/* close hints recording session */
if ( hinter )
@@ -1176,7 +1169,7 @@
/* if there is no path, `closepath' is a no-op */
if ( builder->parse_state == T1_Parse_Have_Path ||
builder->parse_state == T1_Parse_Have_Moveto )
- close_contour( builder );
+ t1_builder_close_contour( builder );
builder->parse_state = T1_Parse_Have_Width;
break;
@@ -1184,7 +1177,8 @@
case op_hlineto:
FT_TRACE4(( " hlineto" ));
- if ( start_point( builder, x, y ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok )
goto Fail;
x += top[0];
@@ -1205,30 +1199,34 @@
case op_hvcurveto:
FT_TRACE4(( " hvcurveto" ));
- if ( start_point( builder, x, y ) ||
- check_points( builder, 3 ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok ||
+ ( error = t1_builder_check_points( builder, 3 ) )
+ != PSaux_Err_Ok )
goto Fail;
x += top[0];
- add_point( builder, x, y, 0 );
+ t1_builder_add_point( builder, x, y, 0 );
x += top[1];
y += top[2];
- add_point( builder, x, y, 0 );
+ t1_builder_add_point( builder, x, y, 0 );
y += top[3];
- add_point( builder, x, y, 1 );
+ t1_builder_add_point( builder, x, y, 1 );
break;
case op_rlineto:
FT_TRACE4(( " rlineto" ));
- if ( start_point( builder, x, y ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok )
goto Fail;
x += top[0];
y += top[1];
Add_Line:
- if ( add_point1( builder, x, y ) )
+ if ( ( error = t1_builder_add_point1( builder, x, y ) )
+ != PSaux_Err_Ok )
goto Fail;
break;
@@ -1248,43 +1246,48 @@
case op_rrcurveto:
FT_TRACE4(( " rrcurveto" ));
- if ( start_point( builder, x, y ) ||
- check_points( builder, 3 ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok ||
+ ( error = t1_builder_check_points( builder, 3 ) )
+ != PSaux_Err_Ok )
goto Fail;
x += top[0];
y += top[1];
- add_point( builder, x, y, 0 );
+ t1_builder_add_point( builder, x, y, 0 );
x += top[2];
y += top[3];
- add_point( builder, x, y, 0 );
+ t1_builder_add_point( builder, x, y, 0 );
x += top[4];
y += top[5];
- add_point( builder, x, y, 1 );
+ t1_builder_add_point( builder, x, y, 1 );
break;
case op_vhcurveto:
FT_TRACE4(( " vhcurveto" ));
- if ( start_point( builder, x, y ) ||
- check_points( builder, 3 ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok ||
+ ( error = t1_builder_check_points( builder, 3 ) )
+ != PSaux_Err_Ok )
goto Fail;
y += top[0];
- add_point( builder, x, y, 0 );
+ t1_builder_add_point( builder, x, y, 0 );
x += top[1];
y += top[2];
- add_point( builder, x, y, 0 );
+ t1_builder_add_point( builder, x, y, 0 );
x += top[3];
- add_point( builder, x, y, 1 );
+ t1_builder_add_point( builder, x, y, 1 );
break;
case op_vlineto:
FT_TRACE4(( " vlineto" ));
- if ( start_point( builder, x, y ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok )
goto Fail;
y += top[0];