[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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
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 */