From 8cc65fdddcf90ac7614a8e30af1f535c258a54d3 Mon Sep 17 00:00:00 2001 From: Alexey Galakhov Date: Tue, 14 May 2019 01:57:12 +0200 Subject: [PATCH] fuzz: make it working again Signed-off-by: Alexey Galakhov --- fuzz/Cargo.toml | 6 +++--- .../{parse_frame.rs => parse_frame_header.rs} | 2 +- fuzz/fuzz_targets/read_message_client.rs | 2 +- fuzz/fuzz_targets/read_message_server.rs | 2 +- .../0a476920bf2b922f5d1955e5bedfedec8c13765c | Bin .../0b3a842c0b93a42d724bbab2504ae92f0593232a | 0 .../0e1990ce3bb9b7c62d5e11b83514467eca3be187 | 0 .../0fe89d4911d87df66f98147a0fd1f3624f34cdaa | 0 .../370ee4d5682fb8c2770cac1ec89e0f6674990afb | Bin .../47167be8eb1f00d36f0a93a8f61c77b4d4d2f515 | Bin .../51112bf88688ede230dd473db8fa0be2b945e636 | 0 .../7a0edc789a1d22737bfbb4cb29f26d994614cb80 | 0 .../9cf76db0663ea4025bbf89de1dfbb2ff818a26ae | 0 .../bc4057a2970c60f0c2b07200842b8d0c15e2af27 | Bin .../bd811f21956aa72bb5a9114bdf4dc61e1710ad44 | 0 .../dc048e38bdb36cf80cc4fe5b3b21ea094510af4a | Bin .../ec7d070174e40ace678006d0c631026f1d9a0779 | 0 .../ef420abfddbda7b9ee665d85ef62e4a437554003 | Bin .../fab3e168d56fecfc59f98a69f75673a53e94c215 | Bin 19 files changed, 6 insertions(+), 6 deletions(-) rename fuzz/fuzz_targets/{parse_frame.rs => parse_frame_header.rs} (75%) rename fuzz/seeds/{parse_frame => parse_frame_header}/0a476920bf2b922f5d1955e5bedfedec8c13765c (100%) rename fuzz/seeds/{parse_frame => parse_frame_header}/0b3a842c0b93a42d724bbab2504ae92f0593232a (100%) rename fuzz/seeds/{parse_frame => parse_frame_header}/0e1990ce3bb9b7c62d5e11b83514467eca3be187 (100%) rename fuzz/seeds/{parse_frame => parse_frame_header}/0fe89d4911d87df66f98147a0fd1f3624f34cdaa (100%) rename fuzz/seeds/{parse_frame => parse_frame_header}/370ee4d5682fb8c2770cac1ec89e0f6674990afb (100%) rename fuzz/seeds/{parse_frame => parse_frame_header}/47167be8eb1f00d36f0a93a8f61c77b4d4d2f515 (100%) rename fuzz/seeds/{parse_frame => parse_frame_header}/51112bf88688ede230dd473db8fa0be2b945e636 (100%) rename fuzz/seeds/{parse_frame => parse_frame_header}/7a0edc789a1d22737bfbb4cb29f26d994614cb80 (100%) rename fuzz/seeds/{parse_frame => parse_frame_header}/9cf76db0663ea4025bbf89de1dfbb2ff818a26ae (100%) rename fuzz/seeds/{parse_frame => parse_frame_header}/bc4057a2970c60f0c2b07200842b8d0c15e2af27 (100%) rename fuzz/seeds/{parse_frame => parse_frame_header}/bd811f21956aa72bb5a9114bdf4dc61e1710ad44 (100%) rename fuzz/seeds/{parse_frame => parse_frame_header}/dc048e38bdb36cf80cc4fe5b3b21ea094510af4a (100%) rename fuzz/seeds/{parse_frame => parse_frame_header}/ec7d070174e40ace678006d0c631026f1d9a0779 (100%) rename fuzz/seeds/{parse_frame => parse_frame_header}/ef420abfddbda7b9ee665d85ef62e4a437554003 (100%) rename fuzz/seeds/{parse_frame => parse_frame_header}/fab3e168d56fecfc59f98a69f75673a53e94c215 (100%) diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index efe5f81..983fa62 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -18,8 +18,8 @@ git = "https://github.com/rust-fuzz/libfuzzer-sys.git" members = ["."] [[bin]] -name = "parse_frame" -path = "fuzz_targets/parse_frame.rs" +name = "parse_frame_header" +path = "fuzz_targets/parse_frame_header.rs" [[bin]] name = "read_message_server" @@ -27,4 +27,4 @@ path = "fuzz_targets/read_message_server.rs" [[bin]] name = "read_message_client" -path = "fuzz_targets/read_message_client.rs" \ No newline at end of file +path = "fuzz_targets/read_message_client.rs" diff --git a/fuzz/fuzz_targets/parse_frame.rs b/fuzz/fuzz_targets/parse_frame_header.rs similarity index 75% rename from fuzz/fuzz_targets/parse_frame.rs rename to fuzz/fuzz_targets/parse_frame_header.rs index 1ed92ec..e4aedf7 100644 --- a/fuzz/fuzz_targets/parse_frame.rs +++ b/fuzz/fuzz_targets/parse_frame_header.rs @@ -8,5 +8,5 @@ fuzz_target!(|data: &[u8]| { let vector: Vec = data.into(); let mut cursor = Cursor::new(vector); - tungstenite::protocol::frame::Frame::parse(&mut cursor); + tungstenite::protocol::frame::FrameHeader::parse(&mut cursor).ok(); }); diff --git a/fuzz/fuzz_targets/read_message_client.rs b/fuzz/fuzz_targets/read_message_client.rs index 15a423f..1c0708b 100644 --- a/fuzz/fuzz_targets/read_message_client.rs +++ b/fuzz/fuzz_targets/read_message_client.rs @@ -33,5 +33,5 @@ fuzz_target!(|data: &[u8]| { //let vector: Vec = data.into(); let cursor = Cursor::new(data); let mut socket = WebSocket::from_raw_socket(WriteMoc(cursor), Role::Client, None); - socket.read_message(); + socket.read_message().ok(); }); diff --git a/fuzz/fuzz_targets/read_message_server.rs b/fuzz/fuzz_targets/read_message_server.rs index d96d649..d96db96 100644 --- a/fuzz/fuzz_targets/read_message_server.rs +++ b/fuzz/fuzz_targets/read_message_server.rs @@ -33,5 +33,5 @@ fuzz_target!(|data: &[u8]| { //let vector: Vec = data.into(); let cursor = Cursor::new(data); let mut socket = WebSocket::from_raw_socket(WriteMoc(cursor), Role::Server, None); - socket.read_message(); + socket.read_message().ok(); }); diff --git a/fuzz/seeds/parse_frame/0a476920bf2b922f5d1955e5bedfedec8c13765c b/fuzz/seeds/parse_frame_header/0a476920bf2b922f5d1955e5bedfedec8c13765c similarity index 100% rename from fuzz/seeds/parse_frame/0a476920bf2b922f5d1955e5bedfedec8c13765c rename to fuzz/seeds/parse_frame_header/0a476920bf2b922f5d1955e5bedfedec8c13765c diff --git a/fuzz/seeds/parse_frame/0b3a842c0b93a42d724bbab2504ae92f0593232a b/fuzz/seeds/parse_frame_header/0b3a842c0b93a42d724bbab2504ae92f0593232a similarity index 100% rename from fuzz/seeds/parse_frame/0b3a842c0b93a42d724bbab2504ae92f0593232a rename to fuzz/seeds/parse_frame_header/0b3a842c0b93a42d724bbab2504ae92f0593232a diff --git a/fuzz/seeds/parse_frame/0e1990ce3bb9b7c62d5e11b83514467eca3be187 b/fuzz/seeds/parse_frame_header/0e1990ce3bb9b7c62d5e11b83514467eca3be187 similarity index 100% rename from fuzz/seeds/parse_frame/0e1990ce3bb9b7c62d5e11b83514467eca3be187 rename to fuzz/seeds/parse_frame_header/0e1990ce3bb9b7c62d5e11b83514467eca3be187 diff --git a/fuzz/seeds/parse_frame/0fe89d4911d87df66f98147a0fd1f3624f34cdaa b/fuzz/seeds/parse_frame_header/0fe89d4911d87df66f98147a0fd1f3624f34cdaa similarity index 100% rename from fuzz/seeds/parse_frame/0fe89d4911d87df66f98147a0fd1f3624f34cdaa rename to fuzz/seeds/parse_frame_header/0fe89d4911d87df66f98147a0fd1f3624f34cdaa diff --git a/fuzz/seeds/parse_frame/370ee4d5682fb8c2770cac1ec89e0f6674990afb b/fuzz/seeds/parse_frame_header/370ee4d5682fb8c2770cac1ec89e0f6674990afb similarity index 100% rename from fuzz/seeds/parse_frame/370ee4d5682fb8c2770cac1ec89e0f6674990afb rename to fuzz/seeds/parse_frame_header/370ee4d5682fb8c2770cac1ec89e0f6674990afb diff --git a/fuzz/seeds/parse_frame/47167be8eb1f00d36f0a93a8f61c77b4d4d2f515 b/fuzz/seeds/parse_frame_header/47167be8eb1f00d36f0a93a8f61c77b4d4d2f515 similarity index 100% rename from fuzz/seeds/parse_frame/47167be8eb1f00d36f0a93a8f61c77b4d4d2f515 rename to fuzz/seeds/parse_frame_header/47167be8eb1f00d36f0a93a8f61c77b4d4d2f515 diff --git a/fuzz/seeds/parse_frame/51112bf88688ede230dd473db8fa0be2b945e636 b/fuzz/seeds/parse_frame_header/51112bf88688ede230dd473db8fa0be2b945e636 similarity index 100% rename from fuzz/seeds/parse_frame/51112bf88688ede230dd473db8fa0be2b945e636 rename to fuzz/seeds/parse_frame_header/51112bf88688ede230dd473db8fa0be2b945e636 diff --git a/fuzz/seeds/parse_frame/7a0edc789a1d22737bfbb4cb29f26d994614cb80 b/fuzz/seeds/parse_frame_header/7a0edc789a1d22737bfbb4cb29f26d994614cb80 similarity index 100% rename from fuzz/seeds/parse_frame/7a0edc789a1d22737bfbb4cb29f26d994614cb80 rename to fuzz/seeds/parse_frame_header/7a0edc789a1d22737bfbb4cb29f26d994614cb80 diff --git a/fuzz/seeds/parse_frame/9cf76db0663ea4025bbf89de1dfbb2ff818a26ae b/fuzz/seeds/parse_frame_header/9cf76db0663ea4025bbf89de1dfbb2ff818a26ae similarity index 100% rename from fuzz/seeds/parse_frame/9cf76db0663ea4025bbf89de1dfbb2ff818a26ae rename to fuzz/seeds/parse_frame_header/9cf76db0663ea4025bbf89de1dfbb2ff818a26ae diff --git a/fuzz/seeds/parse_frame/bc4057a2970c60f0c2b07200842b8d0c15e2af27 b/fuzz/seeds/parse_frame_header/bc4057a2970c60f0c2b07200842b8d0c15e2af27 similarity index 100% rename from fuzz/seeds/parse_frame/bc4057a2970c60f0c2b07200842b8d0c15e2af27 rename to fuzz/seeds/parse_frame_header/bc4057a2970c60f0c2b07200842b8d0c15e2af27 diff --git a/fuzz/seeds/parse_frame/bd811f21956aa72bb5a9114bdf4dc61e1710ad44 b/fuzz/seeds/parse_frame_header/bd811f21956aa72bb5a9114bdf4dc61e1710ad44 similarity index 100% rename from fuzz/seeds/parse_frame/bd811f21956aa72bb5a9114bdf4dc61e1710ad44 rename to fuzz/seeds/parse_frame_header/bd811f21956aa72bb5a9114bdf4dc61e1710ad44 diff --git a/fuzz/seeds/parse_frame/dc048e38bdb36cf80cc4fe5b3b21ea094510af4a b/fuzz/seeds/parse_frame_header/dc048e38bdb36cf80cc4fe5b3b21ea094510af4a similarity index 100% rename from fuzz/seeds/parse_frame/dc048e38bdb36cf80cc4fe5b3b21ea094510af4a rename to fuzz/seeds/parse_frame_header/dc048e38bdb36cf80cc4fe5b3b21ea094510af4a diff --git a/fuzz/seeds/parse_frame/ec7d070174e40ace678006d0c631026f1d9a0779 b/fuzz/seeds/parse_frame_header/ec7d070174e40ace678006d0c631026f1d9a0779 similarity index 100% rename from fuzz/seeds/parse_frame/ec7d070174e40ace678006d0c631026f1d9a0779 rename to fuzz/seeds/parse_frame_header/ec7d070174e40ace678006d0c631026f1d9a0779 diff --git a/fuzz/seeds/parse_frame/ef420abfddbda7b9ee665d85ef62e4a437554003 b/fuzz/seeds/parse_frame_header/ef420abfddbda7b9ee665d85ef62e4a437554003 similarity index 100% rename from fuzz/seeds/parse_frame/ef420abfddbda7b9ee665d85ef62e4a437554003 rename to fuzz/seeds/parse_frame_header/ef420abfddbda7b9ee665d85ef62e4a437554003 diff --git a/fuzz/seeds/parse_frame/fab3e168d56fecfc59f98a69f75673a53e94c215 b/fuzz/seeds/parse_frame_header/fab3e168d56fecfc59f98a69f75673a53e94c215 similarity index 100% rename from fuzz/seeds/parse_frame/fab3e168d56fecfc59f98a69f75673a53e94c215 rename to fuzz/seeds/parse_frame_header/fab3e168d56fecfc59f98a69f75673a53e94c215