From 2edfd7e1687c311e695b1645b0e7f6df6e2b5406 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 4 May 2024 16:42:47 -0400 Subject: [PATCH] * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Remove FT_ABS. See https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=68679 --- src/autofit/aflatin.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c index 316e7c676..89287f7ea 100644 --- a/src/autofit/aflatin.c +++ b/src/autofit/aflatin.c @@ -1263,10 +1263,9 @@ max_height = FT_MAX( max_height, -Axis->blues[nn].descender ); } - dist = FT_ABS( FT_MulFix( max_height, new_scale - scale ) ); - dist &= ~127; + dist = FT_MulFix( max_height, new_scale - scale ); - if ( dist == 0 ) + if ( -128 < dist && dist < 128 ) { FT_TRACE5(( "af_latin_metrics_scale_dim:" " x height alignment (style `%s'):\n",