From 57d6bf82519f39717ddb7b7574ac079e3016757f Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Fri, 27 Aug 2021 10:59:28 -0700 Subject: [PATCH] [subset] in sets union correctly size the pointer array. --- src/hb-subset-input.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-subset-input.hh b/src/hb-subset-input.hh index 0b0609128..3b2c42a96 100644 --- a/src/hb-subset-input.hh +++ b/src/hb-subset-input.hh @@ -52,14 +52,14 @@ struct hb_subset_input_t hb_set_t *name_languages; hb_set_t *layout_features; } sets; - hb_set_t* set_ptrs[1]; + hb_set_t* set_ptrs[sizeof (sets) / sizeof (hb_set_t*)]; }; unsigned flags; inline unsigned num_sets () const { - return sizeof (sets) / sizeof (hb_set_t*); + return sizeof (set_ptrs) / sizeof (hb_set_t*); } inline hb_array_t sets_iter ()