# HG changeset patch # Node ID 1667aa89f1fa # Parent 13a246aa0656 diff --git a/libpurple/tests/Makefile.am b/libpurple/tests/Makefile.am --- a/libpurple/tests/Makefile.am +++ b/libpurple/tests/Makefile.am @@ -4,7 +4,17 @@ clean-local: -rm -rf libpurple.. +fuzz_programs=\ + fuzz_xmlnode \ + fuzz_jabber_id_new \ + fuzz_jabber_caps \ + fuzz_html_to_xhtml \ + fuzz_markup_strip_html \ + fuzz_mime + check_PROGRAMS=check_libpurple +check_PROGRAMS+=$(fuzz_programs) + check_libpurple_SOURCES=\ check_libpurple.c \ @@ -33,4 +43,28 @@ @CHECK_LIBS@ \ $(GLIB_LIBS) +fuzz_xmlnode_SOURCES=fuzz_xmlnode.c +fuzz_xmlnode_LDADD=$(check_libpurple_LDADD) +fuzz_xmlnode_CFLAGS=-fsanitize=fuzzer,address $(check_libpurple_CFLAGS) + +fuzz_jabber_id_new_SOURCES=fuzz_jabber_id_new.c +fuzz_jabber_id_new_LDADD=$(check_libpurple_LDADD) +fuzz_jabber_id_new_CFLAGS=-fsanitize=fuzzer,address $(check_libpurple_CFLAGS) + +fuzz_jabber_caps_SOURCES=fuzz_jabber_caps.c +fuzz_jabber_caps_LDADD=$(check_libpurple_LDADD) +fuzz_jabber_caps_CFLAGS=-fsanitize=fuzzer,address $(check_libpurple_CFLAGS) + +fuzz_mime_SOURCES=fuzz_mime.c +fuzz_mime_LDADD=$(check_libpurple_LDADD) +fuzz_mime_CFLAGS=-fsanitize=fuzzer,address $(check_libpurple_CFLAGS) + +fuzz_html_to_xhtml_SOURCES=fuzz_html_to_xhtml.c +fuzz_html_to_xhtml_LDADD=$(check_libpurple_LDADD) +fuzz_html_to_xhtml_CFLAGS=-fsanitize=fuzzer,address $(check_libpurple_CFLAGS) + +fuzz_markup_strip_html_SOURCES=fuzz_markup_strip_html.c +fuzz_markup_strip_html_LDADD=$(check_libpurple_LDADD) +fuzz_markup_strip_html_CFLAGS=-fsanitize=fuzzer,address $(check_libpurple_CFLAGS) + endif diff --git a/libpurple/tests/dictionaries/html.dict b/libpurple/tests/dictionaries/html.dict new file mode 100644 --- /dev/null +++ b/libpurple/tests/dictionaries/html.dict @@ -0,0 +1,478 @@ +# +# AFL dictionary for HTML parsers +# ------------------------------- +# +# A basic collection of HTML string likely to matter to HTML parsers. +# +# Created by Michal Zalewski +# + +tag_a="" +tag_abbr="" +tag_acronym="" +tag_address="
" +tag_annotation_xml="" +tag_applet="" +tag_area="" +tag_article="
" +tag_aside="