Fix Savannah bug #36833. * src/psaux/t1decode.c (t1operator_seac): `seac' is not a valid operator if we want metrics only.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
diff --git a/ChangeLog b/ChangeLog
index 19ccf31..030bf63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-07-17 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #36833.
+
+ * src/psaux/t1decode.c (t1operator_seac): `seac' is not a valid
+ operator if we want metrics only.
+
2012-07-16 Werner Lemberg <wl@gnu.org>
Fix Savannah bug #36832.
@@ -20,7 +27,7 @@
2012-07-11 Werner Lemberg <wl@gnu.org>
- [smooth] Avoid memory like in case of failure.
+ [smooth] Avoid memory leak in case of failure.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Use flags to
indicate what to clean up after finishing the function, with and
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index ea67841..8afe021 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -4,7 +4,7 @@
/* */
/* PostScript Type 1 decoding routines (body). */
/* */
-/* Copyright 2000-2011 by */
+/* Copyright 2000-2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -208,6 +208,12 @@
return PSaux_Err_Syntax_Error;
}
+ if ( decoder->builder.metrics_only )
+ {
+ FT_ERROR(( "t1operator_seac: unexpected seac\n" ));
+ return PSaux_Err_Syntax_Error;
+ }
+
/* seac weirdness */
adx += decoder->builder.left_bearing.x;