Commit 3ebfe3c5457b639bd0b49bbbfaad099b08e9f7ed

Werner Lemberg 2016-09-05T10:55:07

[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.

diff --git a/ChangeLog b/ChangeLog
index c48ce6f..e84aee0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2016-09-05  Werner Lemberg  <wl@gnu.org>
 
+	[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  <wl@gnu.org>
+
 	[ftrandom] Minor improvements.
 
 	* src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): New macro, set to
diff --git a/src/cff/cf2stack.c b/src/cff/cf2stack.c
index 6fafd90..8f3adb6 100644
--- 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 */