Rename to minify-html
This commit is contained in:
parent
d35e881bb7
commit
dc376d7c7f
47 changed files with 182 additions and 191 deletions
|
|
@ -1,10 +1,10 @@
|
|||
[package]
|
||||
name = "hyperbuild-fuzz-target"
|
||||
publish = false
|
||||
name = "minify-html-fuzz-target"
|
||||
version = "0.0.1"
|
||||
authors = ["Wilson Lin <code@wilsonl.in>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
afl = "0.5.2"
|
||||
hyperbuild = { path = ".." }
|
||||
minify-html = { path = ".." }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Fuzzing
|
||||
|
||||
This folder contains a Cargo package for a fuzz target that can be used for fuzzing with [american fuzzy lop](https://github.com/google/AFL). Fuzzing has found many rare bugs and unhandled edge cases that cause crashes and is invaluable for improving the reliability of hyperbuild.
|
||||
This folder contains a Cargo package for a fuzz target that can be used for fuzzing with [american fuzzy lop](https://github.com/google/AFL). Fuzzing has found many rare bugs and unhandled edge cases that cause crashes and is invaluable for improving the reliability of minify-html.
|
||||
|
||||
## Inputs
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ cargo afl build
|
|||
## Running
|
||||
|
||||
```bash
|
||||
cargo afl fuzz -i in -o out target/debug/hyperbuild-fuzz-target
|
||||
cargo afl fuzz -i in -o out target/debug/minify-html-fuzz-target
|
||||
```
|
||||
|
||||
## Results
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
[package]
|
||||
name = "hyperbuild-fuzz-process"
|
||||
name = "minify-html-fuzz-process"
|
||||
version = "0.0.1"
|
||||
authors = ["Wilson Lin <code@wilsonl.in>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
hyperbuild = { path = "../.." }
|
||||
minify-html = { path = "../.." }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use std::fs;
|
||||
use std::io::{self, Write};
|
||||
use std::panic;
|
||||
use hyperbuild;
|
||||
use minify_html;
|
||||
|
||||
fn main() {
|
||||
for dirent in fs::read_dir("../out/crashes").unwrap() {
|
||||
|
|
@ -9,7 +9,7 @@ fn main() {
|
|||
let path_in_catch = path.clone();
|
||||
let res = panic::catch_unwind(|| {
|
||||
let mut contents = fs::read(path_in_catch).unwrap();
|
||||
let _ = hyperbuild::hyperbuild(&mut contents, &hyperbuild::Cfg {
|
||||
let _ = minify_html::in_place(&mut contents, &minify_html::Cfg {
|
||||
minify_js: false,
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
use afl::fuzz;
|
||||
use hyperbuild::{Cfg, hyperbuild};
|
||||
use minify_html::{Cfg, in_place};
|
||||
|
||||
fn main() {
|
||||
fuzz!(|data: &[u8]| {
|
||||
let mut mut_data: Vec<u8> = data.iter().map(|x| *x).collect();
|
||||
let _ = hyperbuild(&mut mut_data, &Cfg {
|
||||
let _ = in_place(&mut mut_data, &Cfg {
|
||||
minify_js: false,
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Reference in a new issue