shithub: freetype+ttf2subf

Download patch

ref: 3ebfe3c5457b639bd0b49bbbfaad099b08e9f7ed
parent: 1c8bb632991cbd06e5e44c892e4daec472b08cc6
author: Werner Lemberg <[email protected]>
date: Mon Sep 5 06:55:07 EDT 2016

[cff] Fix memory initialization.

* src/cff/cf2stack.c (cf2_stack_init): Use `FT_NEW'.  The `Q'
variants of FreeType's memory allocation macros don't do zeroing.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2016-09-05  Werner Lemberg  <[email protected]>
 
+	[cff] Fix memory initialization.
+
+	* src/cff/cf2stack.c (cf2_stack_init): Use `FT_NEW'.  The `Q'
+	variants of FreeType's memory allocation macros don't do zeroing.
+
+2016-09-05  Werner Lemberg  <[email protected]>
+
 	[ftrandom] Minor improvements.
 
 	* src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): New macro, set to
--- a/src/cff/cf2stack.c
+++ b/src/cff/cf2stack.c
@@ -53,14 +53,14 @@
   cf2_stack_init( FT_Memory  memory,
                   FT_Error*  e )
   {
-    FT_Error  error = FT_Err_Ok;     /* for FT_QNEW */
+    FT_Error  error = FT_Err_Ok;     /* for FT_NEW */
 
     CF2_Stack  stack = NULL;
 
 
-    if ( !FT_QNEW( stack ) )
+    if ( !FT_NEW( stack ) )
     {
-      /* initialize the structure; FT_QNEW zeroes it */
+      /* initialize the structure; FT_NEW zeroes it */
       stack->memory = memory;
       stack->error  = e;
       stack->top    = &stack->buffer[0]; /* empty stack */