summaryrefslogtreecommitdiffstats
path: root/src/psaux
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2010-09-14 17:02:58 -0700
committerNick Kralevich <nnk@google.com>2010-09-15 10:32:30 -0700
commitaacb8e1368a883fcbc9fe64fd0e460cef9c9b20c (patch)
tree2b4c5412391bf31f6a54b237ea83bfde05ec3802 /src/psaux
parentd4476115dee94297c020b3a2b067188117424e25 (diff)
downloadandroid_external_freetype-aacb8e1368a883fcbc9fe64fd0e460cef9c9b20c.tar.gz
android_external_freetype-aacb8e1368a883fcbc9fe64fd0e460cef9c9b20c.tar.bz2
android_external_freetype-aacb8e1368a883fcbc9fe64fd0e460cef9c9b20c.zip
upgrade freetype to 2.4.2.
Bug: 2969145 Change-Id: I8debbbe0bd478d9cf8c39cff5179981b5f3b371a
Diffstat (limited to 'src/psaux')
-rw-r--r--src/psaux/afmparse.c4
-rw-r--r--src/psaux/afmparse.h3
-rw-r--r--src/psaux/psobjs.c12
-rw-r--r--src/psaux/t1decode.c8
4 files changed, 21 insertions, 6 deletions
diff --git a/src/psaux/afmparse.c b/src/psaux/afmparse.c
index 91a17e2..d7de373 100644
--- a/src/psaux/afmparse.c
+++ b/src/psaux/afmparse.c
@@ -4,7 +4,7 @@
/* */
/* AFM parser (body). */
/* */
-/* Copyright 2006, 2007, 2008, 2009 by */
+/* Copyright 2006, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -527,7 +527,7 @@
FT_Byte* base,
FT_Byte* limit )
{
- AFM_Stream stream;
+ AFM_Stream stream = NULL;
FT_Error error;
diff --git a/src/psaux/afmparse.h b/src/psaux/afmparse.h
index de2a530..35d9604 100644
--- a/src/psaux/afmparse.h
+++ b/src/psaux/afmparse.h
@@ -56,7 +56,8 @@ FT_BEGIN_HEADER
typedef struct AFM_ValueRec_
{
enum AFM_ValueType_ type;
- union {
+ union
+ {
char* s;
FT_Fixed f;
FT_Int i;
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index fe8398a..45c7419 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -4,7 +4,8 @@
/* */
/* Auxiliary functions for PostScript fonts (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -1588,6 +1589,13 @@
FT_Error error;
+ /* this might happen in invalid fonts */
+ if ( !outline )
+ {
+ FT_ERROR(( "t1_builder_add_contour: no outline to add points to\n" ));
+ return PSaux_Err_Invalid_File_Format;
+ }
+
if ( !builder->load_points )
{
outline->n_contours++;
@@ -1621,7 +1629,7 @@
if ( builder->parse_state == T1_Parse_Have_Path )
error = PSaux_Err_Ok;
- else if ( builder->parse_state == T1_Parse_Have_Moveto )
+ else
{
builder->parse_state = T1_Parse_Have_Path;
error = t1_builder_add_contour( builder );
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index 31554ff..babf3ba 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -777,6 +777,8 @@
}
/* the two `results' are popped by the following setcurrentpoint */
+ top[0] = x;
+ top[1] = y;
known_othersubr_result_cnt = 2;
break;
@@ -1480,8 +1482,12 @@
goto Syntax_Error;
}
else
+ ...
#endif
- decoder->flex_state = 0;
+
+ x = top[0];
+ y = top[1];
+ decoder->flex_state = 0;
break;
case op_unknown15: