|
|
|
@ -6,6 +6,7 @@ use std::io; |
|
|
|
|
use std::io::Cursor; |
|
|
|
|
use tungstenite::WebSocket; |
|
|
|
|
use tungstenite::protocol::Role; |
|
|
|
|
use tungstenite::extensions::uncompressed::UncompressedExt; |
|
|
|
|
//use std::result::Result;
|
|
|
|
|
|
|
|
|
|
// FIXME: copypasted from tungstenite's protocol/mod.rs
|
|
|
|
@ -32,6 +33,7 @@ impl<Stream: io::Read> io::Read for WriteMoc<Stream> { |
|
|
|
|
fuzz_target!(|data: &[u8]| { |
|
|
|
|
//let vector: Vec<u8> = data.into();
|
|
|
|
|
let cursor = Cursor::new(data); |
|
|
|
|
let mut socket = WebSocket::from_raw_socket(WriteMoc(cursor), Role::Client, None); |
|
|
|
|
let mut socket: WebSocket<_, UncompressedExt> = |
|
|
|
|
WebSocket::from_raw_socket(WriteMoc(cursor), Role::Client, None); |
|
|
|
|
socket.read_message().ok(); |
|
|
|
|
}); |
|
|
|
|
}); |