Commit a11650d7faf4e91d6ad9aafb1bde5207c2c25124

Werner Lemberg 2021-11-21T07:51:31

* src/truetype/ttinterp.c (Ins_MD): Avoid `FT_ABS`. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38562

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index e07981e..731095e 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -5003,9 +5003,9 @@
 
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
     /* Disable Type 2 Vacuform Rounds - e.g. Arial Narrow */
-    if ( SUBPIXEL_HINTING_INFINALITY &&
-         exc->ignore_x_mode          &&
-         FT_ABS( D ) == 64           )
+    if ( SUBPIXEL_HINTING_INFINALITY         &&
+         exc->ignore_x_mode                  &&
+         ( D < 0 ? NEG_LONG( D ) : D ) == 64 )
       D += 1;
 #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */