[autofit] Prevent signed integer overflow.

Reported as

  https://issues.oss-fuzz.com/issues/496105489

* src/autofit/aflatin.c
  (af_glyph_hints_apply_vertical_separation_adjustments): Use `ADD_LONG` and
  `SUB_LONG`.
This commit is contained in:
Werner Lemberg 2026-04-02 07:56:04 +02:00
parent 07d8d50a63
commit 675a94f5d0

View file

@ -3739,7 +3739,7 @@
pos = ADD_LONG( high_min_y, adjustment_amount );
if ( adjust_below_top && is_top_tilde )
pos += high_height;
pos = ADD_LONG( pos, high_height );
if ( pos % 64 == 0 && tilde_height < 3 * 64 )
{
@ -3892,7 +3892,7 @@
pos = SUB_LONG( low_max_y, adjustment_amount );
if ( adjust_above_bottom && is_bottom_tilde )
pos -= low_height;
pos = SUB_LONG( pos, low_height );
if ( pos % 64 == 0 && tilde_height < 3 * 64 )
{