freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master 3ebfe3c: [cff] Fix memory initialization.


From: Werner LEMBERG
Subject: [freetype2] master 3ebfe3c: [cff] Fix memory initialization.
Date: Mon, 5 Sep 2016 08:55:22 +0000 (UTC)

branch: master
commit 3ebfe3c5457b639bd0b49bbbfaad099b08e9f7ed
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    [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.
---
 ChangeLog          |    7 +++++++
 src/cff/cf2stack.c |    6 +++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c48ce6f..e84aee0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2016-09-05  Werner Lemberg  <address@hidden>
 
+       [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  <address@hidden>
+
        [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 */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]