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

Unified Diff: net/websockets/websocket_deflate_stream_fuzzer.cc

Issue 2308443002: Make FuzzedDataProvider vend std::strings (Closed)
Patch Set: thestig review Created 4 years, 2 months 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 | « net/url_request/url_request_data_job_fuzzer.cc ('k') | net/websockets/websocket_frame_parser_fuzzer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_deflate_stream_fuzzer.cc
diff --git a/net/websockets/websocket_deflate_stream_fuzzer.cc b/net/websockets/websocket_deflate_stream_fuzzer.cc
index fc5a15084c8ad42258b75acadb162d3ae683a516..ca401d14d5f0fc91df2890edcb4fc3ac50796cd1 100644
--- a/net/websockets/websocket_deflate_stream_fuzzer.cc
+++ b/net/websockets/websocket_deflate_stream_fuzzer.cc
@@ -67,9 +67,8 @@ class WebSocketFuzzedStream final : public WebSocketStream {
frame->header.reserved3 = (flags >> 3) & 0x1;
frame->header.masked = (flags >> 4) & 0x1;
uint64_t payload_length = fuzzed_data_provider_.ConsumeInt32InRange(0, 64);
- base::StringPiece payload =
- fuzzed_data_provider_.ConsumeBytes(payload_length);
- frame->data = new WrappedIOBuffer(payload.data());
+ std::string payload = fuzzed_data_provider_.ConsumeBytes(payload_length);
+ frame->data = new StringIOBuffer(payload);
frame->header.payload_length = payload.size();
return frame;
}
« no previous file with comments | « net/url_request/url_request_data_job_fuzzer.cc ('k') | net/websockets/websocket_frame_parser_fuzzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698