From 752e393ad2f5ec4f7faae84f5322fbef41ddb2ab Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Mon, 29 Mar 2021 17:23:33 -0700 Subject: [PATCH] [subset] avoid calling clear on null pool set. --- src/hb-ot-layout-gsubgpos.hh | 3 ++- ...se-minimized-hb-subset-fuzzer-5617065093365760 | Bin 0 -> 160 bytes 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5617065093365760 diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index f82097680..abc60e68e 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -116,7 +116,8 @@ struct hb_closure_context_t : } } - done_lookups_glyph_set->get (lookup_index)->clear (); + if (done_lookups_glyph_set->get (lookup_index)->get_population ()) + done_lookups_glyph_set->get (lookup_index)->clear (); } hb_set_t *covered_glyph_set = done_lookups_glyph_set->get (lookup_index); diff --git a/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5617065093365760 b/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5617065093365760 new file mode 100644 index 0000000000000000000000000000000000000000..590e6fc39842251b5ab20b02dfea7e70954a72e8 GIT binary patch literal 160 zcmZQzWME)mRAN?8He+xP4s{YaV9x>+k$SGq0FvQi5CKBQoJ0l*1`Z&P8AvlS$V_;- z6;qB4EXTmW1k#ZL)XkoV$^jWs2?h`~U{isX00E-`D?b;I2IBAk1@##iuK@uA!&L?V Dp_~