Optimize intersects_array to fix fuzzer timeout.
diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh
index 1380e55..4f0e17b 100644
--- a/src/hb-ot-layout-gsubgpos.hh
+++ b/src/hb-ot-layout-gsubgpos.hh
@@ -712,11 +712,11 @@
intersects_func_t intersects_func,
const void *intersects_data)
{
- return
- + hb_iter (values, count)
- | hb_map ([&] (const HBUINT16 &_) { return intersects_func (glyphs, _, intersects_data); })
- | hb_any
- ;
+ for (const HBUINT16 &_ : + hb_iter (values, count))
+ {
+ if (intersects_func (glyphs, _, intersects_data)) return true;
+ }
+ return false;
}
diff --git a/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5763024094232576 b/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5763024094232576
new file mode 100644
index 0000000..da1b718
--- /dev/null
+++ b/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5763024094232576
Binary files differ