diff --git a/src/hb-subset.cc b/src/hb-subset.cc index 6a5ce526d..d91699de4 100644 --- a/src/hb-subset.cc +++ b/src/hb-subset.cc @@ -107,6 +107,7 @@ _try_subset (const TableType *table, hb_subset_context_t* c /* OUT */) { c->serializer->start_serialize (); + if (c->serializer->in_error ()) return false; bool needed = table->subset (c); if (!c->serializer->ran_out_of_room ()) diff --git a/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-4681956043390976 b/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-4681956043390976 new file mode 100644 index 000000000..56bc9411d Binary files /dev/null and b/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-4681956043390976 differ