Fix for CFF space glyph regression (#57541). * src/psaux/psft.c (cf2_decoder_parse_substrings): Replace early-out with FT_OFFSET.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
diff --git a/ChangeLog b/ChangeLog
index ad34231..a0d747c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-02-25 Dominik Röttsches <drott@chromium.org>
+
+ Fix for CFF space glyph regression (#57541).
+
+ * src/psaux/psft.c (cf2_decoder_parse_substrings): Replace early-out
+ with FT_OFFSET.
+
2020-02-22 Werner Lemberg <wl@gnu.org>
[woff2] Fix font table access.
diff --git a/src/psaux/psft.c b/src/psaux/psft.c
index 08dd33c..50b40bf 100644
--- a/src/psaux/psft.c
+++ b/src/psaux/psft.c
@@ -316,9 +316,6 @@
FT_Bool is_t1 = decoder->builder.is_t1;
- if ( !charstring_base || !charstring_len )
- return FT_ERR( Invalid_File_Format );
-
FT_ASSERT( decoder &&
( is_t1 || decoder->cff ) );
@@ -388,7 +385,7 @@
FT_ZERO( &buf );
buf.start =
buf.ptr = charstring_base;
- buf.end = charstring_base + charstring_len;
+ buf.end = FT_OFFSET( charstring_base, charstring_len );
FT_ZERO( &transform );