diff --git a/src/hb-ot-cff1-table.hh b/src/hb-ot-cff1-table.hh index e1296c391..7228f7772 100644 --- a/src/hb-ot-cff1-table.hh +++ b/src/hb-ot-cff1-table.hh @@ -1087,7 +1087,8 @@ struct cff1 if (num_glyphs != sc.get_num_glyphs ()) { fini (); return; } - privateDicts.resize (fdCount); + if (unlikely (!privateDicts.resize (fdCount))) + { fini (); return; } for (unsigned int i = 0; i < fdCount; i++) privateDicts[i].init (); diff --git a/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5641892164009984 b/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5641892164009984 new file mode 100644 index 000000000..dbf5f8cf4 Binary files /dev/null and b/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5641892164009984 differ