From 0b6970ed70fe6ce296e71f3c8e65f74872b64659 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 10 Jun 2022 14:28:57 +0200 Subject: [PATCH] readme: document fuzzing setup These are just the standard AFL instructions, adapted to Meson. Signed-off-by: Simon Ser --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 5a35623..0ef7494 100644 --- a/README.md +++ b/README.md @@ -33,9 +33,18 @@ contains a small collection of EDID blobs and diffs between upstream up-to-date. A patch should never make the diffs grow larger. To add a new EDID blob or update a diff, use `test/edid-decode-diff.sh test/data/`. +## Fuzzing + +To fuzz libdisplay-info with [AFL], the library needs to be instrumented: + + CC=afl-gcc meson build/ + ninja -C build/ + afl-fuzz -i test/data/ -o afl/ build/di-edid-decode + [GitLab project]: https://gitlab.freedesktop.org/emersion/libdisplay-info [Wayland contribution guidelines]: https://gitlab.freedesktop.org/wayland/wayland/-/blob/main/CONTRIBUTING.md [Developer Certificate of Origin 1.1]: https://developercertificate.org/ [freedesktop.org Contributor Covenant]: https://www.freedesktop.org/wiki/CodeOfConduct/ [Meson]: https://mesonbuild.com/ [edid-decode]: https://git.linuxtv.org/edid-decode.git/ +[AFL]: https://lcamtuf.coredump.cx/afl/