mirror of
git://git.sv.nongnu.org/freetype/freetype2.git
synced 2026-01-19 04:52:09 +00: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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user