Browse Source

Initial restore from dtparse

Bradlee Speice 1 year ago
commit
ee60471858
3 changed files with 35 additions and 0 deletions
  1. 2
    0
      .gitignore
  2. 23
    0
      Cargo.toml
  3. 10
    0
      fuzzers/fuzzer_script_1.rs

+ 2
- 0
.gitignore View File

@@ -0,0 +1,2 @@
1
+target/
2
+Cargo.lock

+ 23
- 0
Cargo.toml View File

@@ -0,0 +1,23 @@
1
+
2
+[package]
3
+name = "dtparse-fuzz"
4
+version = "0.0.1"
5
+authors = ["Automatically generated"]
6
+publish = false
7
+
8
+[package.metadata]
9
+cargo-fuzz = true
10
+
11
+[dependencies]
12
+dtparse = "0.9"
13
+
14
+[dependencies.libfuzzer-sys]
15
+git = "https://github.com/rust-fuzz/libfuzzer-sys.git"
16
+
17
+# Prevent this from interfering with workspaces
18
+[workspace]
19
+members = ["."]
20
+
21
+[[bin]]
22
+name = "fuzzer_script_1"
23
+path = "fuzzers/fuzzer_script_1.rs"

+ 10
- 0
fuzzers/fuzzer_script_1.rs View File

@@ -0,0 +1,10 @@
1
+#![no_main]
2
+extern crate libfuzzer_sys;
3
+extern crate dtparse;
4
+use dtparse::parse;
5
+#[export_name="rust_fuzzer_test_input"]
6
+pub extern fn go(data: &[u8]) {
7
+    if let Ok(s) = std::str::from_utf8(data) {
8
+        parse(s);
9
+    }
10
+}

Loading…
Cancel
Save