aboutsummaryrefslogtreecommitdiffstats
path: root/fuzz/fuzz_targets
diff options
context:
space:
mode:
Diffstat (limited to 'fuzz/fuzz_targets')
-rw-r--r--fuzz/fuzz_targets/micromark.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/fuzz/fuzz_targets/micromark.rs b/fuzz/fuzz_targets/micromark.rs
new file mode 100644
index 0000000..f4d2927
--- /dev/null
+++ b/fuzz/fuzz_targets/micromark.rs
@@ -0,0 +1,16 @@
+#![no_main]
+use libfuzzer_sys::fuzz_target;
+extern crate micromark;
+
+fuzz_target!(|data: &[u8]| {
+ if let Ok(s) = std::str::from_utf8(data) {
+ let _ = micromark::micromark(s);
+ let _ = micromark::micromark_with_options(
+ s,
+ &micromark::Options {
+ constructs: micromark::Constructs::gfm(),
+ ..micromark::Options::default()
+ },
+ );
+ }
+});