From ec8965e432db27f81b3275c6979fef707f3b9da9 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 2 Jun 2023 16:10:25 -0600 Subject: [PATCH] [subset/glyf] Don't clear loca allocation --- src/OT/glyf/glyf-helpers.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OT/glyf/glyf-helpers.hh b/src/OT/glyf/glyf-helpers.hh index 30106b2b9..f23f63008 100644 --- a/src/OT/glyf/glyf-helpers.hh +++ b/src/OT/glyf/glyf-helpers.hh @@ -71,7 +71,7 @@ _add_loca_and_head (hb_subset_plan_t * plan, Iterator padded_offsets, bool use_s { unsigned num_offsets = padded_offsets.len () + 1; unsigned entry_size = use_short_loca ? 2 : 4; - char *loca_prime_data = (char *) hb_calloc (entry_size, num_offsets); + char *loca_prime_data = (char *) hb_malloc (entry_size * num_offsets); if (unlikely (!loca_prime_data)) return false;