* src/sfnt/ttcmap0.c (tt_cmap4_validate): Provide a weak variant
of the glyph ID bounding check if FT_VALIDATE_TIGHT is not active. Without this change, many CJK fonts from Dynalab are rejected.
This commit is contained in:
parent
8b61525b9a
commit
13c4a4f171
|
@ -1,3 +1,9 @@
|
|||
2003-04-23 Akito Hirai <akito@kde.gr.jp>
|
||||
|
||||
* src/sfnt/ttcmap0.c (tt_cmap4_validate): Provide a weak variant
|
||||
of the glyph ID bounding check if FT_VALIDATE_TIGHT is not active.
|
||||
Without this change, many CJK fonts from Dynalab are rejected.
|
||||
|
||||
2003-04-23 Joe Marcus Clarke <marcus@FreeBSD.org>
|
||||
|
||||
* src/base/ftbdf.c (FT_Get_BDF_Property): Check for valid
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* TrueType new character mapping table (cmap) support (body). */
|
||||
/* */
|
||||
/* Copyright 2002 by */
|
||||
/* Copyright 2002, 2003 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
@ -701,9 +701,18 @@
|
|||
p += offset; /* start of glyph id array */
|
||||
|
||||
/* check that we point within the glyph ids table only */
|
||||
if ( p < glyph_ids ||
|
||||
p + ( end - start + 1 ) * 2 > table + length )
|
||||
FT_INVALID_DATA;
|
||||
if ( valid->level >= FT_VALIDATE_TIGHT )
|
||||
{
|
||||
if ( p < glyph_ids ||
|
||||
p + ( end - start + 1 ) * 2 > table + length )
|
||||
FT_INVALID_DATA;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( p < glyph_ids ||
|
||||
p + ( end - start + 1 ) * 2 > valid->limit )
|
||||
FT_INVALID_DATA;
|
||||
}
|
||||
|
||||
/* check glyph indices within the segment range */
|
||||
if ( valid->level >= FT_VALIDATE_TIGHT )
|
||||
|
|
Loading…
Reference in New Issue