summaryrefslogtreecommitdiffstats
path: root/src/psaux
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@google.com>2014-08-08 17:55:11 -0400
committerBehdad Esfahbod <behdad@google.com>2014-08-08 17:59:36 -0400
commit9c745321260bb728ab1cd1c8fd5f075854b2ad49 (patch)
tree86c9ee0214cac2870a94905e4240732413ed768b /src/psaux
parentec0bab5697bb31ba980810145f62e3799946ec60 (diff)
downloadandroid_external_freetype-staging/cm-12.0-caf.tar.gz
android_external_freetype-staging/cm-12.0-caf.tar.bz2
android_external_freetype-staging/cm-12.0-caf.zip
Update freetype to e1394d56752cac3bd68ab2358a8e1384ce7b9aaastaging/cm-12.0-cafstaging/cm-12.0
Integrated patches from freetype2 git repository, up to hashval e1394d56752cac3bd68ab2358a8e1384ce7b9aaa, which is post-2.5.3. Most recent commit message from freetype git: Minor documentation improvement. Noteworthy patches included: Fix Savannah bug #41697, part 2. Fix Savannah bug #41697, part 1. Bug: 16575323 Change-Id: I4f8f9375afd2540618b3ebf6152d77b743975dce
Diffstat (limited to 'src/psaux')
-rw-r--r--src/psaux/psobjs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index dd976d3..b4b7d45 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -4,7 +4,7 @@
/* */
/* Auxiliary functions for PostScript fonts (body). */
/* */
-/* Copyright 1996-2013 by */
+/* Copyright 1996-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -847,6 +847,8 @@
/* first character must be a delimiter or a part of a number */
/* NB: `values' can be NULL if we just want to skip the */
/* array; in this case we ignore `max_values' */
+ /* */
+ /* return number of successfully parsed values */
static FT_Int
ps_tofixedarray( FT_Byte* *acur,
@@ -1200,7 +1202,7 @@
result = ps_tofixedarray( &cur, limit, 4, temp, 0 );
- if ( result < 0 )
+ if ( result < 4 )
{
FT_ERROR(( "ps_parser_load_field:"
" expected four integers in bounding box\n" ));
@@ -1230,7 +1232,7 @@
{
result = ps_tofixedarray( &cur, limit, max_objects,
temp + i * max_objects, 0 );
- if ( result < 0 )
+ if ( result < 0 || (FT_UInt)result < max_objects )
{
FT_ERROR(( "ps_parser_load_field:"
" expected %d integers in the %s subarray\n"