From 5a058ba15837be53d8835031a689c22e369531b2 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 May 2022 05:35:17 -0600 Subject: [PATCH] [shape-fuzzer] Add commented out more buffer-verify option Those currently fail and I've been unable to debug them. I tried two, passing them to hb-shape doesn't reproduce the failure. :( --- test/fuzzing/hb-shape-fuzzer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/fuzzing/hb-shape-fuzzer.cc b/test/fuzzing/hb-shape-fuzzer.cc index 09bc1b43d..ce6e356e0 100644 --- a/test/fuzzing/hb-shape-fuzzer.cc +++ b/test/fuzzing/hb-shape-fuzzer.cc @@ -33,7 +33,7 @@ extern "C" int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size) { const char text[] = "ABCDEXYZ123@_%&)*$!"; hb_buffer_t *buffer = hb_buffer_create (); - hb_buffer_set_flags (buffer, HB_BUFFER_FLAG_VERIFY); + hb_buffer_set_flags (buffer, (hb_buffer_flags_t) (HB_BUFFER_FLAG_VERIFY /* | HB_BUFFER_FLAG_PRODUCE_UNSAFE_TO_CONCAT */)); hb_buffer_add_utf8 (buffer, text, -1, 0, -1); hb_buffer_guess_segment_properties (buffer); hb_shape (font, buffer, nullptr, 0); @@ -51,7 +51,7 @@ extern "C" int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size) text32[10] = test_font (font, text32[15]) % 256; hb_buffer_t *buffer = hb_buffer_create (); -// hb_buffer_set_flags (buffer, HB_BUFFER_FLAG_VERIFY); + // hb_buffer_set_flags (buffer, (hb_buffer_flags_t) (HB_BUFFER_FLAG_VERIFY | HB_BUFFER_FLAG_PRODUCE_UNSAFE_TO_CONCAT)); hb_buffer_add_utf32 (buffer, text32, sizeof (text32) / sizeof (text32[0]), 0, -1); hb_buffer_guess_segment_properties (buffer); hb_shape (font, buffer, nullptr, 0);