Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(593)

Unified Diff: testing/libfuzzer/fuzzers/quic_crypto_framer_parse_message_fuzzer.cc

Issue 1508343005: fuzzer for QUIC net::CryptoFramer::ParseMessage implemented (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix indentation error Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/libfuzzer/fuzzers/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/libfuzzer/fuzzers/quic_crypto_framer_parse_message_fuzzer.cc
diff --git a/testing/libfuzzer/fuzzers/websocket_frame_parser_fuzzer.cc b/testing/libfuzzer/fuzzers/quic_crypto_framer_parse_message_fuzzer.cc
similarity index 52%
copy from testing/libfuzzer/fuzzers/websocket_frame_parser_fuzzer.cc
copy to testing/libfuzzer/fuzzers/quic_crypto_framer_parse_message_fuzzer.cc
index f1d710c768e1d9f182f1b6a9d0b277bac40442cd..c5725baa684e3e49a0dab4bb86011d2eba7ce54a 100644
--- a/testing/libfuzzer/fuzzers/websocket_frame_parser_fuzzer.cc
+++ b/testing/libfuzzer/fuzzers/quic_crypto_framer_parse_message_fuzzer.cc
@@ -4,13 +4,14 @@
#include <vector>
-#include "net/websockets/websocket_frame_parser.h"
+#include "base/strings/string_piece.h"
+#include "net/quic/crypto/crypto_framer.h"
// Entry point for LibFuzzer.
extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data, size_t size) {
- net::WebSocketFrameParser parser;
- std::vector<scoped_ptr<net::WebSocketFrameChunk>> frame_chunks;
- parser.Decode(reinterpret_cast<const char*>(data), size, &frame_chunks);
+ base::StringPiece crypto_input(reinterpret_cast<const char *>(data), size);
+ std::unique_ptr<net::CryptoHandshakeMessage> handshake_message(
+ net::CryptoFramer::ParseMessage(crypto_input));
return 0;
}
« no previous file with comments | « testing/libfuzzer/fuzzers/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698