aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/pfr/pfrsbit.c
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/src/pfr/pfrsbit.c')
-rw-r--r--freetype/src/pfr/pfrsbit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/freetype/src/pfr/pfrsbit.c b/freetype/src/pfr/pfrsbit.c
index 1bb878e1d..e04dcd169 100644
--- a/freetype/src/pfr/pfrsbit.c
+++ b/freetype/src/pfr/pfrsbit.c
@@ -59,7 +59,7 @@
if ( !decreasing )
{
- writer->line += writer->pitch * ( target->rows-1 );
+ writer->line += writer->pitch * ( target->rows - 1 );
writer->pitch = -writer->pitch;
}
}
@@ -636,7 +636,9 @@
* which causes a size truncation, because truncated
* size properties makes bitmap glyph broken.
*/
- if ( xpos > FT_INT_MAX || ( ypos + ysize ) > FT_INT_MAX )
+ if ( xpos > FT_INT_MAX || xpos < FT_INT_MIN ||
+ ysize > FT_INT_MAX || ypos + ysize > FT_INT_MAX ||
+ ypos + (FT_Long)ysize < FT_INT_MIN )
{
FT_TRACE1(( "pfr_slot_load_bitmap:" ));
FT_TRACE1(( "huge bitmap glyph %dx%d over FT_GlyphSlot\n",