* src/pcf/pcfread.c (pcf_get_encodings): Check index of defaultChar.

Reported as

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9527
GSoC-2018-nikhil
Werner Lemberg 7 years ago
parent 9be385c94d
commit b98133a4e9
  1. 8
      ChangeLog
  2. 8
      src/pcf/pcfread.c

@ -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>
* src/pcf/pcfread.c (pcf_load_font): Fix number of glyphs.

@ -1059,6 +1059,14 @@ THE SOFTWARE.
else
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 )
{
/* do the swapping */

Loading…
Cancel
Save