From fa0436ddd16e463dfd4600822b90f8943ff7baf5 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Wed, 15 Jul 2020 09:52:40 +0430 Subject: [PATCH] [ENOMEM][fuzzer/subset] early return if the result is null I don't see _or_fail APIs idiomatic for the project but since it is there, let's have this --- test/fuzzing/hb-subset-fuzzer.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/test/fuzzing/hb-subset-fuzzer.cc b/test/fuzzing/hb-subset-fuzzer.cc index 428765ea3..0addc6c86 100644 --- a/test/fuzzing/hb-subset-fuzzer.cc +++ b/test/fuzzing/hb-subset-fuzzer.cc @@ -16,6 +16,7 @@ trySubset (hb_face_t *face, bool retain_gids) { hb_subset_input_t *input = hb_subset_input_create_or_fail (); + if (!input) return; hb_subset_input_set_drop_hints (input, drop_hints); hb_subset_input_set_retain_gids (input, retain_gids); hb_set_t *codepoints = hb_subset_input_unicode_set (input);