* src/pcf/pcfread.c (pcf_load_font): Fix number of glyphs.

This is an oversight of the module change 2018-07-21.

Reported as

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9524
This commit is contained in:
Werner Lemberg 2018-07-22 12:49:25 +02:00
parent a5acdce100
commit 9be385c94d
2 changed files with 11 additions and 8 deletions

View File

@ -1,3 +1,13 @@
2018-07-22 Werner Lemberg <wl@gnu.org>
* src/pcf/pcfread.c (pcf_load_font): Fix number of glyphs.
This is an oversight of the module change 2018-07-21.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9524
2018-07-22 Werner Lemberg <wl@gnu.org>
[cid] Sanitize `BlueShift' and `BlueFuzz'.

View File

@ -1538,14 +1538,7 @@ THE SOFTWARE.
else
root->family_name = NULL;
/*
* Note: We shift all glyph indices by +1 since we must
* respect the convention that glyph 0 always corresponds
* to the `missing glyph'.
*
* This implies bumping the number of `available' glyphs by 1.
*/
root->num_glyphs = (FT_Long)( face->nmetrics + 1 );
root->num_glyphs = (FT_Long)face->nmetrics;
root->num_fixed_sizes = 1;
if ( FT_NEW_ARRAY( root->available_sizes, 1 ) )