[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master c177cc3 1/3: [woff2] Avoid some memory zeroing.
From: |
Werner Lemberg |
Subject: |
[freetype2] master c177cc3 1/3: [woff2] Avoid some memory zeroing. |
Date: |
Sat, 1 May 2021 09:23:34 -0400 (EDT) |
branch: master
commit c177cc354dc8b46a5a61d8abdceaab07617d87dc
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>
[woff2] Avoid some memory zeroing.
* src/sfnt/sfwoff2.c (store_loca, woff2_open_font): Tweak macros.
---
ChangeLog | 6 ++++++
src/sfnt/sfwoff2.c | 12 ++++++------
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3cd3bf8..6370455 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [woff2] Avoid some memory zeroing.
+
+ * src/sfnt/sfwoff2.c (store_loca, woff2_open_font): Tweak macros.
+
2021-04-30 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/gzip/ftgzip.c (ft_gzip_alloc): Zero out memory again.
diff --git a/src/sfnt/sfwoff2.c b/src/sfnt/sfwoff2.c
index 5a665b3..df04072 100644
--- a/src/sfnt/sfwoff2.c
+++ b/src/sfnt/sfwoff2.c
@@ -795,7 +795,7 @@
goto Fail;
loca_buf_size = loca_values_size * offset_size;
- if ( FT_NEW_ARRAY( loca_buf, loca_buf_size ) )
+ if ( FT_QNEW_ARRAY( loca_buf, loca_buf_size ) )
goto Fail;
dst = loca_buf;
@@ -2123,8 +2123,8 @@
/* Create a temporary array. */
- if ( FT_NEW_ARRAY( temp_indices,
- ttc_font->num_tables ) )
+ if ( FT_QNEW_ARRAY( temp_indices,
+ ttc_font->num_tables ) )
goto Exit;
FT_TRACE4(( "Storing tables for TTC face index %d.\n", face_index ));
@@ -2132,9 +2132,9 @@
temp_indices[nn] = indices[ttc_font->table_indices[nn]];
/* Resize array to required size. */
- if ( FT_RENEW_ARRAY( indices,
- woff2.num_tables,
- ttc_font->num_tables ) )
+ if ( FT_QRENEW_ARRAY( indices,
+ woff2.num_tables,
+ ttc_font->num_tables ) )
goto Exit;
for ( nn = 0; nn < ttc_font->num_tables; nn++ )
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master c177cc3 1/3: [woff2] Avoid some memory zeroing.,
Werner Lemberg <=