Skip to content

Latest commit

 

History

History
22 lines (13 loc) · 591 Bytes

FUZZING.md

File metadata and controls

22 lines (13 loc) · 591 Bytes

To do fuzz testing using AFL compile with the AFL compiler wrappers:

mkdir build
cd build
CC=afl-clang CXX=afl-clang++ cmake ..
mkdir testcase_dir

You need some data to start the fuzzing. In this case I am using all the test messages from the unit tests:

find ../test/t/ -name data-\*.pbf -a -not -empty -exec cp {} testcase_dir/ \;

Then do the actual fuzzing:

afl-fuzz -i testcase_dir -o findings_dir -- tools/pbf-decoder -

See the AFL documentation for more information.

This only checkes the reading side of Protozero!