Skip to content

Commit

Permalink
Merge #119
Browse files Browse the repository at this point in the history
119: Add rsass targets r=frewsxcv a=killercup

Currently finds >50 unique crashes (according to honggfuzz)!

Co-authored-by: Pascal Hertleif <killercup@gmail.com>
  • Loading branch information
bors[bot] and killercup committed May 7, 2018
2 parents e9860eb + 6d78b1d commit 7864bab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ xmlparser = { git = "https://github.com/RazrFalcon/xmlparser" }
usvg = { git = "https://github.com/RazrFalcon/usvg" }
http = { git = "https://github.com/hyperium/http" }
sleep-parser = { git = "https://github.com/datrs/sleep-parser" }
rsass = { git = "https://github.com/kaj/rsass" }
12 changes: 12 additions & 0 deletions common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ extern crate xmlparser;
extern crate usvg;
extern crate http;
extern crate sleep_parser;
extern crate rsass;

#[inline(always)]
pub fn fuzz_brotli_read(data: &[u8]) {
Expand Down Expand Up @@ -979,3 +980,14 @@ pub fn fuzz_sleep_parser_header(data: &[u8]) {
sleep_parser::Header::from_vec(&header.to_vec()).unwrap();
}
}

#[inline(always)]
pub fn fuzz_rsass_sass(data: &[u8]) {
use rsass::{OutputStyle, compile_scss};
let _ = compile_scss(data, OutputStyle::Compressed);
}

#[inline(always)]
pub fn fuzz_rsass_value(data: &[u8]) {
let _ = rsass::compile_value(data);
}

0 comments on commit 7864bab

Please sign in to comment.