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

Unified Diff: webrtc/test/fuzzers/pseudotcp_parser_fuzzer.cc

Issue 2858343002: Fixing pseudotcp_parser_fuzzer crash with NO_MAIN_THREAD_WRAPPING. (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/fuzzers/pseudotcp_parser_fuzzer.cc
diff --git a/webrtc/test/fuzzers/pseudotcp_parser_fuzzer.cc b/webrtc/test/fuzzers/pseudotcp_parser_fuzzer.cc
index 4e14a13eebab87884d2144fbdeb4119da4fe1d10..5e4165e5d2cbec194f6b2aae38759a6189254aa3 100644
--- a/webrtc/test/fuzzers/pseudotcp_parser_fuzzer.cc
+++ b/webrtc/test/fuzzers/pseudotcp_parser_fuzzer.cc
@@ -31,19 +31,18 @@ class FakeIPseudoTcpNotify : public cricket::IPseudoTcpNotify {
struct Environment {
explicit Environment(cricket::IPseudoTcpNotify* notifier):
- ptcp(new cricket::PseudoTcp(notifier, 0)) {
+ ptcp(notifier, 0) {
}
- cricket::PseudoTcp* const ptcp;
-
// We need the thread to avoid some uninteresting crashes, since the
// production code expects there to be a thread object available.
rtc::AutoThread thread;
+ cricket::PseudoTcp ptcp;
};
Environment* env = new Environment(new FakeIPseudoTcpNotify());
void FuzzOneInput(const uint8_t* data, size_t size) {
- env->ptcp->NotifyPacket(reinterpret_cast<const char*>(data), size);
+ env->ptcp.NotifyPacket(reinterpret_cast<const char*>(data), size);
}
} // namespace webrtc
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698