shithub: freetype+ttf2subf

Download patch

ref: 577daf1c306ebc479a50813efa7cd1c669a82d1a
parent: 581c7e2a510ed09b1401af8d9b7ed5eb329a954b
author: Werner Lemberg <[email protected]>
date: Tue Sep 15 03:10:16 EDT 2015

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

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2015-09-15  Werner Lemberg  <[email protected]>
 
+	* src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964).
+
+2015-09-15  Werner Lemberg  <[email protected]>
+
 	[type1, type42] Check encoding array size (#45961).
 
 	* src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -1287,8 +1287,7 @@
         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 )