From 577daf1c306ebc479a50813efa7cd1c669a82d1a Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 15 Sep 2015 07:10:16 +0200 Subject: [PATCH] * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964). --- ChangeLog | 4 ++++ src/pcf/pcfread.c | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a69a1a493..bf7194857 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-09-15 Werner Lemberg + + * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964). + 2015-09-15 Werner Lemberg [type1, type42] Check encoding array size (#45961). diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c index 039af33e9..9da7e75e5 100644 --- a/src/pcf/pcfread.c +++ b/src/pcf/pcfread.c @@ -1287,8 +1287,7 @@ THE SOFTWARE. prop = pcf_find_property( face, "POINT_SIZE" ); if ( prop ) /* convert from 722.7 decipoints to 72 points per inch */ - bsize->size = - (FT_Pos)( ( prop->value.l * 64 * 7200 + 36135L ) / 72270L ); + bsize->size = FT_MulDiv( prop->value.l, 64 * 7200, 72270L ); prop = pcf_find_property( face, "PIXEL_SIZE" ); if ( prop )