Commit 577daf1c306ebc479a50813efa7cd1c669a82d1a

Werner Lemberg 2015-09-15T07:10:16

* src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964).

diff --git a/ChangeLog b/ChangeLog
index a69a1a4..bf71948 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2015-09-15  Werner Lemberg  <wl@gnu.org>
 
+	* src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964).
+
+2015-09-15  Werner Lemberg  <wl@gnu.org>
+
 	[type1, type42] Check encoding array size (#45961).
 
 	* src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
index 039af33..9da7e75 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 )