summaryrefslogtreecommitdiffstats
path: root/src/psaux
diff options
context:
space:
mode:
Diffstat (limited to 'src/psaux')
-rw-r--r--src/psaux/psobjs.c9
-rw-r--r--src/psaux/t1decode.c4
2 files changed, 9 insertions, 4 deletions
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index c7cbc67..1d3c7e6 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -594,6 +594,9 @@
error = FT_THROW( Invalid_File_Format );
}
+ if ( cur > limit )
+ cur = limit;
+
parser->error = error;
parser->cursor = cur;
}
@@ -1229,15 +1232,17 @@
if ( result < 0 || (FT_UInt)result < max_objects )
{
FT_ERROR(( "ps_parser_load_field:"
- " expected %d integers in the %s subarray\n"
+ " expected %d integer%s in the %s subarray\n"
" "
" of /FontBBox in the /Blend dictionary\n",
- max_objects,
+ max_objects, max_objects > 1 ? "s" : "",
i == 0 ? "first"
: ( i == 1 ? "second"
: ( i == 2 ? "third"
: "fourth" ) ) ));
error = FT_THROW( Invalid_File_Format );
+
+ FT_FREE( temp );
goto Exit;
}
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index 2e19928..5811fcb 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -512,7 +512,7 @@
break;
case 12:
- if ( ip > limit )
+ if ( ip >= limit )
{
FT_ERROR(( "t1_decoder_parse_charstrings:"
" invalid escape (12+EOF)\n" ));
@@ -669,7 +669,7 @@
if ( large_int )
FT_TRACE4(( " %ld", value ));
else
- FT_TRACE4(( " %ld", Fix2Int( value ) ));
+ FT_TRACE4(( " %ld", value / 65536 ));
#endif
*top++ = value;