shithub: freetype+ttf2subf

Download patch

ref: 1167bff3e9a6302687667c6134673e4b3fd13636
parent: 0fcf486e0d6f3bb1cb17b6a6f00f651e21077dda
author: Werner Lemberg <[email protected]>
date: Sun Oct 6 19:22:34 EDT 2019

* src/sfnt/sfwoff2 (reconstruct_glyf): Fix reallocation.

Reported as

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

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2019-10-06  Werner Lemberg  <[email protected]>
 
+	* src/sfnt/sfwoff2 (reconstruct_glyf): Fix reallocation.
+
+	Reported as
+
+	  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18046
+
+2019-10-06  Werner Lemberg  <[email protected]>
+
 	Improve memory debugging.
 
 	* include/freetype/internal/ftmemory.h (FT_MEM_FREE): Use
--- a/src/sfnt/sfwoff2.c
+++ b/src/sfnt/sfwoff2.c
@@ -1235,6 +1235,9 @@
     if ( !error )
       error = FT_THROW( Invalid_Table );
 
+    /* Set pointer `sfnt_bytes' to its correct value. */
+    *sfnt_bytes = sfnt;
+
     FT_FREE( substreams );
     FT_FREE( loca_values );
     FT_FREE( n_points_arr );