mirror of
https://gitlab.freedesktop.org/freetype/freetype.git
synced 2026-05-09 06:18:04 +02:00
[autofit] Prevent signed integer overflow.
Reported as https://issues.oss-fuzz.com/issues/473582304 * src/autofit/afloader.c (af_loader_load_glyph): Use `ADD_LONG`.
This commit is contained in:
parent
26adb9ff98
commit
4553f1c396
1 changed files with 4 additions and 2 deletions
|
|
@ -532,8 +532,10 @@
|
|||
slot->metrics.horiBearingX = bbox.xMin;
|
||||
slot->metrics.horiBearingY = bbox.yMax;
|
||||
|
||||
slot->metrics.vertBearingX = FT_PIX_FLOOR( bbox.xMin + vvector.x );
|
||||
slot->metrics.vertBearingY = FT_PIX_FLOOR( bbox.yMax + vvector.y );
|
||||
slot->metrics.vertBearingX = FT_PIX_FLOOR( ADD_LONG( bbox.xMin,
|
||||
vvector.x ) );
|
||||
slot->metrics.vertBearingY = FT_PIX_FLOOR( ADD_LONG( bbox.yMax,
|
||||
vvector.y ) );
|
||||
|
||||
/* for mono-width fonts (like Andale, Courier, etc.) we need */
|
||||
/* to keep the original rounded advance width; ditto for */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue