mirror of
https://gitlab.freedesktop.org/freetype/freetype.git
synced 2026-05-07 13:28:03 +02:00
* src/truetype/ttgload.c (load_truetype_glyph): fixing crash when dealing
with invalid fonts (i.e. glyph size < 10 bytes)..
This commit is contained in:
parent
3b7f20b4ec
commit
24c7b56a57
2 changed files with 15 additions and 0 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2001-12-14 Scott Long <scott@swiftview.com>
|
||||
|
||||
* src/truetype/ttgload.c (load_truetype_glyph): fixing crash when dealing
|
||||
with invalid fonts (i.e. glyph size < 10 bytes)..
|
||||
|
||||
2001-12-14 Sam Latinga <slouken@devolution.com>
|
||||
|
||||
* builds/mac/freetype.mac: a new Makefile to build with MPW on MacOS
|
||||
|
|
|
|||
|
|
@ -723,6 +723,16 @@
|
|||
if ( index < (FT_UInt)face->num_locations - 1 )
|
||||
count = face->glyph_locations[index + 1] - offset;
|
||||
|
||||
/* temporary hack */
|
||||
#if 1
|
||||
if ( count < 10 )
|
||||
{
|
||||
/* This glyph is corrupted -- it does not have a complete header */
|
||||
error = TT_Err_Invalid_Outline;
|
||||
goto Fail;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( count == 0 )
|
||||
{
|
||||
/* as described by Frederic Loyer, these are spaces, and */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue