[truetype]: Fix behaviour of MIAP for invalid arguments. * src/truetype/ttinterp.c (Ins_MIAP): Set reference points even in case of error.
diff --git a/ChangeLog b/ChangeLog
index 07a6eee..eb1113f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-01-30 LIU Sun-Liang <sunliang_liu@foxitsoftware.com>
+
+ [truetype]: Fix behaviour of MIAP for invalid arguments.
+
+ * src/truetype/ttinterp.c (Ins_MIAP): Set reference points even in
+ case of error.
+
2011-01-18 Werner Lemberg <wl@gnu.org>
[truetype] Fix handling of MIRP instruction.
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 2ae7a4d..921f613 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -5996,7 +5996,7 @@
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
- return;
+ goto Fail;
}
/* XXX: UNDOCUMENTED! */
@@ -6042,6 +6042,7 @@
CUR_Func_move( &CUR.zp0, point, distance - org_dist );
+ Fail:
CUR.GS.rp0 = point;
CUR.GS.rp1 = point;
}