shithub: freetype+ttf2subf

Download patch

ref: 1937b557341187eda5434a8a64da9880472c4cd4
parent: ac2ea865f3e019321f77f5c6b286ba1ddc6f6159
author: Werner Lemberg <[email protected]>
date: Tue Aug 14 03:54:25 EDT 2018

[cff] Fix missing error handling.

Reported as

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9865

* src/psaux/cffparse.c (cff_parser_run)
[CFF_CONFIG_OPTION_OLD_ENGINE]: Don't ignore return value of
`parse_charstrings_old'.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2018-08-14  Werner Lemberg  <[email protected]>
+
+	[cff] Fix missing error handling.
+
+	Reported as
+
+	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9865
+
+	* src/psaux/cffparse.c (cff_parser_run)
+	[CFF_CONFIG_OPTION_OLD_ENGINE]: Don't ignore return value of
+	`parse_charstrings_old'.
+
 2018-08-14  Alexei Podtelezhnikov  <[email protected]>
 
 	[bdf] Remove unused overflow storage.
--- a/src/cff/cffparse.c
+++ b/src/cff/cffparse.c
@@ -1231,6 +1231,8 @@
 
         error = psaux->cff_decoder_funcs->parse_charstrings_old(
                   &decoder, charstring_base, charstring_len, 1 );
+        if ( error )
+          goto Exit;
 
         /* Now copy the stack data in the temporary decoder object,    */
         /* converting it back to charstring number representations     */