mirror of
https://gitlab.freedesktop.org/freetype/freetype.git
synced 2026-05-07 02:58:02 +02:00
* src/base/ftbitmap.c (FT_Bitmap_Blend): Check final dimensions.
Fixes #1413.
This commit is contained in:
parent
53850f3cd5
commit
b6bcd2177f
1 changed files with 8 additions and 0 deletions
|
|
@ -838,6 +838,14 @@
|
|||
fbx.yMin = FT_MIN( sbx.yMin, tbx.yMin );
|
||||
fbx.xMax = FT_MAX( sbx.xMax, tbx.xMax );
|
||||
fbx.yMax = FT_MAX( sbx.yMax, tbx.yMax );
|
||||
|
||||
/* sanity check */
|
||||
if ( fbx.xMin < -0x10000 || fbx.xMax >= 0x10000 ||
|
||||
fbx.yMin < -0x10000 || fbx.yMax >= 0x10000 )
|
||||
{
|
||||
FT_TRACE5(( "FT_Bitmap_Blend: final dimension overflow\n" ));
|
||||
return FT_THROW( Invalid_Argument );
|
||||
}
|
||||
}
|
||||
else
|
||||
fbx = sbx;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue