* src/truetype/ttpload.c (tt_face_get_location): Off-by-one typo.
Also improve tracing message. Problem reported as https://bugs.chromium.org/p/chromium/issues/detail?id=738919
This commit is contained in:
parent
39af82ebbf
commit
3d083fc213
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2017-07-12 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/truetype/ttpload.c (tt_face_get_location): Off-by-one typo.
|
||||
|
||||
Also improve tracing message.
|
||||
|
||||
Problem reported as
|
||||
|
||||
https://bugs.chromium.org/p/chromium/issues/detail?id=738919
|
||||
|
||||
2017-07-07 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[cff] Integer overflow.
|
||||
|
@ -247,13 +247,13 @@
|
||||
if ( pos2 > face->glyf_len )
|
||||
{
|
||||
/* We try to sanitize the last `loca' entry. */
|
||||
if ( gindex == face->num_locations - 1 )
|
||||
if ( gindex == face->num_locations - 2 )
|
||||
{
|
||||
FT_TRACE1(( "tt_face_get_location:"
|
||||
" too large offset (0x%08lx) found for glyph index %ld,\n"
|
||||
" too large size (%ld bytes) found for glyph index %ld,\n"
|
||||
" "
|
||||
" truncating at the end of `glyf' table (0x%08lx)\n",
|
||||
pos2, gindex + 1, face->glyf_len ));
|
||||
" truncating at the end of `glyf' table to %ld bytes\n",
|
||||
pos2 - pos1, gindex, face->glyf_len - pos1 ));
|
||||
pos2 = face->glyf_len;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user