diff --git a/common/Cargo.toml b/common/Cargo.toml index 6a657c7..f475339 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -47,3 +47,4 @@ svgtypes = { git = "https://github.com/RazrFalcon/svgtypes" } 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" } diff --git a/common/src/lib.rs b/common/src/lib.rs index 0d7c384..c40887b 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -41,6 +41,7 @@ extern crate svgtypes; extern crate xmlparser; extern crate usvg; extern crate http; +extern crate sleep_parser; #[inline(always)] pub fn fuzz_brotli_read(data: &[u8]) { @@ -956,3 +957,9 @@ pub fn fuzz_http_uri(data: &[u8]) { } } +#[inline(always)] +pub fn fuzz_sleep_parser_header(data: &[u8]) { + if let Ok(header) = sleep_parser::Header::from_vec(data) { + sleep_parser::Header::from_vec(&header.to_vec()).unwrap(); + } +}