Index: src/psaux/t1decode.c |
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c |
index 90874f022663d16fb131c452a4ba0bc125d7a970..ea678412245768da4e2e6f31acb96ec8ea1a8da2 100644 |
--- a/src/psaux/t1decode.c |
+++ b/src/psaux/t1decode.c |
@@ -199,7 +199,7 @@ |
#ifdef FT_CONFIG_OPTION_INCREMENTAL |
T1_Face face = (T1_Face)decoder->builder.face; |
-#endif |
+#endif |
if ( decoder->seac ) |
@@ -400,7 +400,7 @@ |
if ( decoder->buildchar && decoder->len_buildchar > 0 ) |
ft_memset( &decoder->buildchar[0], |
0, |
- sizeof( decoder->buildchar[0] ) * decoder->len_buildchar ); |
+ sizeof ( decoder->buildchar[0] ) * decoder->len_buildchar ); |
FT_TRACE4(( "\n" |
"Start charstring\n" )); |
@@ -764,6 +764,13 @@ |
if ( arg_cnt != 0 ) |
goto Unexpected_OtherSubr; |
+ if ( decoder->flex_state == 0 ) |
+ { |
+ FT_ERROR(( "t1_decoder_parse_charstrings:" |
+ " missing flex start\n" )); |
+ goto Syntax_Error; |
+ } |
+ |
/* note that we should not add a point for index 0; */ |
/* this will move our current position to the flex */ |
/* point without adding any point to the outline */ |
@@ -873,7 +880,7 @@ |
ft_memcpy( &decoder->buildchar[idx], |
blend->weight_vector, |
blend->num_designs * |
- sizeof( blend->weight_vector[0] ) ); |
+ sizeof ( blend->weight_vector[0] ) ); |
} |
break; |
@@ -1106,7 +1113,7 @@ |
FT_TRACE4(( "BuildCharArray = [ " )); |
for ( i = 0; i < decoder->len_buildchar; ++i ) |
- FT_TRACE4(( "%d ", decoder->buildchar[ i ] )); |
+ FT_TRACE4(( "%d ", decoder->buildchar[i] )); |
FT_TRACE4(( "]\n" )); |
} |