[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.
This commit is contained in:
suzuki toshiya 2015-09-28 01:40:21 +09:00
parent 3dffe8ef16
commit 8a05d250df
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
[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 <apodtele@gmail.com>
* src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro.

View File

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