From 8a05d250dfa49a2b47372b4400b1e2c0b242f528 Mon Sep 17 00:00:00 2001 From: suzuki toshiya Date: Mon, 28 Sep 2015 01:40:21 +0900 Subject: [PATCH] [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. --- ChangeLog | 7 +++++++ src/base/ftmac.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 715009141..6d0941e5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-09-27 suzuki toshiya + + [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 * src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro. diff --git a/src/base/ftmac.c b/src/base/ftmac.c index 846319045..114bbb639 100644 --- 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 */