blob: 09d8e9f325e561604dac18d4ec024a369022e8a3 [file] [log] [blame]
This file contains a target function for FreeType fuzzing. It can be
used with libFuzzer ( or
potentially any other similar fuzzer.
1. Build `libfreetype.a' and `' using the most recent
clang compiler with these flags:
# for fuzzer coverage feedback
# for bug checking
You also need the header files from the `libarchive' library
( for handling tar files (see file
`' below for more).
2. Link with `libFuzzer' (it contains `main') and `libarchive'.
3. Run the fuzzer on some test corpus.
The exact flags and commands may vary.
There is a continuous fuzzing bot that runs ftfuzzer.
(You need an account to be able to see coverage reports and the like
Check the bot configuration for the most current settings.
FreeType has the ability to `attach' auxiliary files to a font file,
providing additional information. The main usage is to load AFM files
for PostScript Type 1 fonts.
However, libFuzzer currently only supports mutation of a single input
file. For this reason, `' contains a custom fuzzer
mutator that uses an uncompressed tar file archive as the input. The
first file in such a tarball gets opened by FreeType as a font, all
other files are treated as input for `FT_Attach_Stream'.
Compilation is similar to `ftfuzzer.c'.
To run the target function on a set of input files, this file contains
a convenience `main' function. Link it with `',
`libfreetype.a', and `libarchive' and run like
./a.out my_tests_inputs/*
Copyright 2015-2018 by
David Turner, Robert Wilhelm, and Werner Lemberg.
This file is part of the FreeType project, and may only be used,
modified, and distributed under the terms of the FreeType project
license, LICENSE.TXT. By continuing to use, modify, or distribute
this file you indicate that you have read the license and understand
and accept it fully.
--- end of README ---