Add targets for 'http' crate
frewsxcv opened this issue · 4 comments
frewsxcv commented
frewsxcv commented
http
just had it's 1.0 release
I threw together a fuzz target for StatusCode
:
#![no_main]
#[macro_use] extern crate libfuzzer_sys;
extern crate http;
fuzz_target!(|data: &[u8]| {
if let Ok(status_code) = http::status::StatusCode::from_bytes(data) {
status_code.is_informational();
status_code.is_success();
status_code.is_redirection();
status_code.is_client_error();
status_code.is_server_error();
status_code.to_string();
let s = status_code.as_str();
format!("{:?}", status_code);
assert_eq!(
status_code,
http::status::StatusCode::from_bytes(s.as_bytes()).unwrap()
);
}
});
killercup commented
I think you meant 0.1 :)
The crate has a few of from_bytes
methods. Do you want to add fuzzers for all of them?
frewsxcv commented
yeah, seems appropriate to add fuzz targets for each of those, though i don't think there's too much nuanced logic in the 'http' crate that would catch any bugs, but you never know!
killercup commented
You know how the saying goes: Better be fuzzy than sorry
Corey Farwell <notifications@github.com> schrieb am So. 10. Sep. 2017 um
20:19:
… yeah, seems appropriate to add fuzz targets for each of those, though i
don't think there's too much nuanced logic in the 'http' crate that would
catch any bugs, but you never know!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#88 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABOX2MTJQAJYHf3o4TQxkLT-Hniol2qks5shCgXgaJpZM4OprWG>
.