summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Wagner <bungeman@google.com>2017-09-23 00:44:59 +0200
committerWerner Lemberg <wl@gnu.org>2017-09-23 00:44:59 +0200
commit63be40bccf02bd280da14c0249658e5531b3ea20 (patch)
tree941bcbc7052926237752dc0501fb10d59b0d2f87
parentb0103677be2eac55f4a9c966d2ab4a5d597a57c6 (diff)
downloadfreetype2-63be40bccf02bd280da14c0249658e5531b3ea20.tar.gz
[truetype] Really fix #52082.
* src/truetype/ttinterp.c (Ins_MDRP): Correct conditional.
-rw-r--r--ChangeLog6
-rw-r--r--src/truetype/ttinterp.c7
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 74ecf96b4..fe62b19c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-09-23 Ben Wagner <bungeman@google.com>
+
+ [truetype] Really fix #52082.
+
+ * src/truetype/ttinterp.c (Ins_MDRP): Correct conditional.
+
2017-09-23 Werner Lemberg <wl@gnu.org>
[otvalid] Handle `GDEF' v1.2 and v1.3 tables.
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index e3c8f1289..50eb246c1 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -6079,8 +6079,11 @@
/* single width cut-in test */
/* |org_dist - single_width_value| < single_width_cutin */
- if ( org_dist < exc->GS.single_width_value + exc->GS.single_width_cutin ||
- org_dist > exc->GS.single_width_value - exc->GS.single_width_cutin )
+ if ( exc->GS.single_width_cutin > 0 &&
+ ( org_dist < exc->GS.single_width_value +
+ exc->GS.single_width_cutin ||
+ org_dist > exc->GS.single_width_value -
+ exc->GS.single_width_cutin ) )
{
if ( org_dist >= 0 )
org_dist = exc->GS.single_width_value;