Files
harfbuzz/test/fuzzing
Behdad Esfahbod f9de50ab52 [raster] Simplify hb_raster_paint_glyph; add set/get_palette
hb_raster_paint_glyph() took the palette index and foreground
color as per-call arguments, duplicating state that also lives on
the paint context (foreground via hb_raster_paint_set_foreground,
palette previously only available as a per-call arg).  This gave
callers two paths for configuring the same state.

Drop the per-call palette/foreground arguments and require callers
to configure them via setters before painting, matching the
already-established pattern in hb_vector_paint_glyph() and
elsewhere in the subsystem.

- Drop palette and foreground args from hb_raster_paint_glyph().
- Add hb_raster_paint_set_palette() / _get_palette() and a
  hb_raster_paint_get_foreground() companion.
- Store palette on hb_raster_paint_t (default 0).
- Update util/raster-output.hh, util/hb-raster-all.cc, and
  test/fuzzing/hb-raster-fuzzer.cc to the new API.
- Update the hb-raster section-doc example.

Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 03:35:47 -06:00
..
2023-05-27 01:16:46 +02:00
2025-04-06 02:34:48 -06:00
2026-03-27 15:18:47 -06:00
2026-03-09 22:13:03 -03:00

To build the fuzzers with libFuzzer to perform actual fuzzing, build with:

CXX=clang++ CXXFLAGS="-fsanitize=address,fuzzer-no-link" meson fuzzbuild --default-library=static -Dfuzzer_ldflags="-fsanitize=address,fuzzer"

ninja -Cfuzzbuild

Then, run the fuzzer like this:

fuzzbuild/test/fuzzing/hb-{shape,raster,vector,subset,set}-fuzzer [-max_len=2048] [CORPUS_DIR]

Where max_len specifies the maximal length of font files to handle. The smaller the faster.

For more details consult the following locations: