* src/pcf/pcfread.c (pcf_get_encodings): Check index of defaultChar.
Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9527
This commit is contained in:
parent
9be385c94d
commit
b98133a4e9
|
@ -1,3 +1,11 @@
|
||||||
|
2018-07-22 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
* src/pcf/pcfread.c (pcf_get_encodings): Check index of defaultChar.
|
||||||
|
|
||||||
|
Reported as
|
||||||
|
|
||||||
|
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9527
|
||||||
|
|
||||||
2018-07-22 Werner Lemberg <wl@gnu.org>
|
2018-07-22 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
* src/pcf/pcfread.c (pcf_load_font): Fix number of glyphs.
|
* src/pcf/pcfread.c (pcf_load_font): Fix number of glyphs.
|
||||||
|
|
|
@ -1059,6 +1059,14 @@ THE SOFTWARE.
|
||||||
else
|
else
|
||||||
defaultCharEncodingOffset = FT_PEEK_USHORT_LE( pos );
|
defaultCharEncodingOffset = FT_PEEK_USHORT_LE( pos );
|
||||||
|
|
||||||
|
if ( defaultCharEncodingOffset >= face->nmetrics )
|
||||||
|
{
|
||||||
|
FT_TRACE0(( "pcf_get_encodings:"
|
||||||
|
" Invalid glyph index for default character,"
|
||||||
|
" setting to zero\n" ));
|
||||||
|
defaultCharEncodingOffset = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if ( defaultCharEncodingOffset )
|
if ( defaultCharEncodingOffset )
|
||||||
{
|
{
|
||||||
/* do the swapping */
|
/* do the swapping */
|
||||||
|
|
Loading…
Reference in New Issue