Skip to content

Commit 9fb48cd

Browse files
author
pfeatherstone
committed
more cov
1 parent 52abb1a commit 9fb48cd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

examples/fuzz/websocket_parser.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,17 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
2323
const auto current_data = view.data();
2424
const auto current_buf = view.buffer();
2525
ec_msg = ec ? ec.message() : "";
26-
26+
2727
view.resize(10);
2828
view.clear();
2929
msg.assign(data, data+size);
3030
buf.clear();
3131
http::serialize_websocket_message(boost::asio::buffer(msg), http::WS_OPCODE_DATA_BINARY, true, buf);
32+
buf.clear();
33+
http::serialize_websocket_message(boost::asio::buffer(msg), http::WS_OPCODE_DATA_BINARY, false, buf);
34+
buf.clear();
35+
http::serialize_websocket_message(boost::asio::buffer(msg), http::WS_OPCODE_DATA_TEXT, true, buf);
36+
buf.clear();
37+
http::serialize_websocket_message(boost::asio::buffer(msg), http::WS_OPCODE_DATA_TEXT, false, buf);
3238
return 0;
3339
}

0 commit comments

Comments
 (0)