Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add regex syntax target #112

Merged
merged 1 commit into from
Apr 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ proc-macro2 = { git = "https://github.com/alexcrichton/proc-macro2.git" }
pulldown-cmark = { git = "https://github.com/google/pulldown-cmark.git" }
quick-xml = { git = "https://github.com/tafia/quick-xml" }
regex = { git = "https://github.com/rust-lang-nursery/regex" }
regex-syntax = { git = "https://github.com/rust-lang-nursery/regex" }
ring = { git = "https://github.com/briansmith/ring" }
semver = { git = "https://github.com/steveklabnik/semver" }
serde_json = { git = "https://github.com/serde-rs/json", features = ["arbitrary_precision"] }
Expand Down
8 changes: 8 additions & 0 deletions common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ extern crate proc_macro2;
extern crate pulldown_cmark;
extern crate quick_xml;
extern crate regex;
extern crate regex_syntax;
extern crate ring;
extern crate semver;
extern crate serde_json;
Expand Down Expand Up @@ -475,6 +476,13 @@ pub fn fuzz_quick_xml_read(data: &[u8]) {
}
}

#[inline(always)]
pub fn fuzz_regex_syntax(data: &[u8]) {
if let Ok(data) = std::str::from_utf8(data) {
let _ = regex_syntax::Parser::new().parse(data);
}
}

#[inline(always)]
pub fn fuzz_regex_is_match(data: &[u8]) {
if let Ok(data) = std::str::from_utf8(data) {
Expand Down