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 */