shithub: freetype+ttf2subf

Download patch

ref: f0fa7a67bfc334775b030d95cac763eeb7247436
parent: d87bb9160a48c9daacc810513ea3482ee1a0f3cc
author: Werner Lemberg <[email protected]>
date: Sat Sep 3 02:33:36 EDT 2016

[cff] Avoid null pointer passed to FT_MEM_COPY (#48984).

* src/cff/cffload.c (cff_index_get_name): Check `byte_len'.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-09-03  Werner Lemberg  <[email protected]>
+
+	[cff] Avoid null pointer passed to FT_MEM_COPY (#48984).
+
+	* src/cff/cffload.c (cff_index_get_name): Check `byte_len'.
+
 2016-09-02  Werner Lemberg  <[email protected]>
 
 	[unix] Enable 64bit support in file system access (#48962).
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -602,7 +602,8 @@
 
     if ( !FT_ALLOC( name, byte_len + 1 ) )
     {
-      FT_MEM_COPY( name, bytes, byte_len );
+      if ( byte_len )
+        FT_MEM_COPY( name, bytes, byte_len );
       name[byte_len] = 0;
     }
     cff_index_forget_element( idx, &bytes );