diff --git a/src/hb-serialize.hh b/src/hb-serialize.hh index 3ce1b8019..4566153a5 100644 --- a/src/hb-serialize.hh +++ b/src/hb-serialize.hh @@ -332,6 +332,7 @@ struct hb_serialize_context_t unsigned to_bias (const void *base) const { + if (unlikely (in_error ())) return 0; if (!base) return 0; assert (current); assert (current->head <= (const char *) base); diff --git a/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5927551890096128 b/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5927551890096128 new file mode 100644 index 000000000..a5f5af8c8 Binary files /dev/null and b/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5927551890096128 differ