From 97a2f0320056b591d7a747022869fe9cd8ecc6e1 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 12 Feb 2018 18:51:10 -0800 Subject: [PATCH] [subset] Allocate bulk memory with malloc(), not calloc() We use calloc() to allocate simple structs and set them to zero. For bulk memory, use malloc() that doesn't zero. --- src/hb-subset-glyf.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-subset-glyf.cc b/src/hb-subset-glyf.cc index 952946786..0a06313e3 100644 --- a/src/hb-subset-glyf.cc +++ b/src/hb-subset-glyf.cc @@ -132,8 +132,8 @@ _hb_subset_glyf_and_loca (const OT::glyf::accelerator_t &glyf, return false; } - char *glyf_prime_data = (char *) calloc (glyf_prime_size, 1); - char *loca_prime_data = (char *) calloc (loca_prime_size, 1); + char *glyf_prime_data = (char *) malloc (glyf_prime_size); + char *loca_prime_data = (char *) malloc (loca_prime_size); if (unlikely (!_write_glyf_and_loca_prime (glyf, glyf_data, glyphs_to_retain, *use_short_loca, glyf_prime_size, glyf_prime_data,