[truetype] Avoid some memory zeroing. * src/truetype/ttinterp.c (Init_Context): Tweak allocation macro. * src/truetype/ttpload.c (tt_face_load_cvt): Ditto.
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 40 41 42 43
diff --git a/ChangeLog b/ChangeLog
index 6370455..9d9a6a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com>
+ [truetype] Avoid some memory zeroing.
+
+ * src/truetype/ttinterp.c (Init_Context): Tweak allocation macro.
+ * src/truetype/ttpload.c (tt_face_load_cvt): Ditto.
+
+2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com>
+
[woff2] Avoid some memory zeroing.
* src/sfnt/sfwoff2.c (store_loca, woff2_open_font): Tweak macros.
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index ee21a1f..1b2ba7b 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -306,7 +306,7 @@
exec->memory = memory;
exec->callSize = 32;
- if ( FT_NEW_ARRAY( exec->callStack, exec->callSize ) )
+ if ( FT_QNEW_ARRAY( exec->callStack, exec->callSize ) )
goto Fail_Memory;
/* all values in the context are set to 0 already, but this is */
diff --git a/src/truetype/ttpload.c b/src/truetype/ttpload.c
index c3ae21c..6c12c97 100644
--- a/src/truetype/ttpload.c
+++ b/src/truetype/ttpload.c
@@ -347,7 +347,7 @@
face->cvt_size = table_len / 2;
- if ( FT_NEW_ARRAY( face->cvt, face->cvt_size ) )
+ if ( FT_QNEW_ARRAY( face->cvt, face->cvt_size ) )
goto Exit;
if ( FT_FRAME_ENTER( face->cvt_size * 2L ) )