shithub: freetype+ttf2subf

Download patch

ref: 8a05d250dfa49a2b47372b4400b1e2c0b242f528
parent: 3dffe8ef16e88ea38f0fe908f5787bda8a462e6f
author: suzuki toshiya <[email protected]>
date: Sun Sep 27 21:40:21 EDT 2015

[mac] Fix buffer size calculation for LWFN font.

* src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong
to prevent confused copy by too large chunk size.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-09-27  suzuki toshiya  <[email protected]>
+
+	[mac] Fix buffer size calculation for LWFN font.
+
+	* src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong
+	to prevent confused copy by too large chunk size.
+
 2015-09-26  Alexei Podtelezhnikov  <[email protected]>
 
 	* src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro.
--- a/src/base/ftmac.c
+++ b/src/base/ftmac.c
@@ -618,7 +618,7 @@
           total_size += 6; /* code + 4 bytes chunk length */
       }
 
-      total_size += GetHandleSize( post_data ) - 2;
+      total_size += (FT_ULong)GetHandleSize( post_data ) - 2;
       last_code = code;
 
       /* detect resource fork overflow */