From bec14f688925467be708f01378fbbf82e6b19b42 Mon Sep 17 00:00:00 2001 From: Ewald Hew Date: Wed, 22 Nov 2017 18:57:56 +0800 Subject: [PATCH] * src/psaux/psft.c (cf2_setGlyphWidth): Check format before setting. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4377 --- ChangeLog | 8 ++++++++ src/psaux/psft.c | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d5fc9c251..82d6f2c2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2017-11-22 Ewald Hew + + * src/psaux/psft.c (cf2_setGlyphWidth): Check format before setting. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4377 + 2017-11-22 Ewald Hew [psaux] Fix CFF advance widths. (#52466) diff --git a/src/psaux/psft.c b/src/psaux/psft.c index 0f9bdd9c6..bd5f831f4 100644 --- a/src/psaux/psft.c +++ b/src/psaux/psft.c @@ -95,7 +95,8 @@ FT_ASSERT( decoder ); - *decoder->glyph_width = cf2_fixedToInt( width ); + if ( !decoder->builder.is_t1 ) + *decoder->glyph_width = cf2_fixedToInt( width ); }