* src/truetype/ttinterp.c (Ins_SHZ): Fix the range limit.

Fixes #1419 and #1420, as well as
    https://issues.oss-fuzz.com/issues/499455833
This commit is contained in:
Alexei Podtelezhnikov 2026-04-22 20:49:51 -04:00
parent 7974be74d8
commit 1803559c4e

View file

@ -5132,13 +5132,11 @@
/* XXX: UNDOCUMENTED! SHZ doesn't move the phantom points. */
/* Twilight zone has no real contours, so use `n_points'. */
/* Normal zone's `n_points' includes phantoms, so must */
/* use end of last contour. */
/* subtract them. */
if ( exc->GS.gep2 == 0 )
limit = exc->zp2.n_points;
else if ( exc->GS.gep2 == 1 && exc->zp2.n_contours > 0 )
limit = exc->zp2.contours[exc->zp2.n_contours - 1] + 1;
else
limit = 0;
limit = exc->zp2.n_points - 4U;
/* XXX: UNDOCUMENTED! SHZ doesn't touch the points */
for ( i = 0; i < limit; i++ )