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

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

Issue 1463523002: Implement fuzzing of VP9 depacketization. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: remove include Created 5 years, 1 month 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
Index: webrtc/test/fuzzers/webrtc_fuzzer_main.cc
diff --git a/webrtc/test/fuzzers/webrtc_fuzzer_main.cc b/webrtc/test/fuzzers/webrtc_fuzzer_main.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9c29a5dc57fca61238a6c66fc4e55ea3f8e72467
--- /dev/null
+++ b/webrtc/test/fuzzers/webrtc_fuzzer_main.cc
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+#include "webrtc/base/logging.h"
+
+// This file is intended to provide a common interface for fuzzing functions, so
+// whether we're running fuzzing under libFuzzer or DrFuzz the webrtc functions
+// can remain the same.
+// TODO(pbos): Implement FuzzOneInput() for more than one platform (currently
+// libFuzzer).
+
+namespace webrtc {
+extern void FuzzOneInput(const uint8_t* data, size_t size);
+} // namespace webrtc
+
+extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data, size_t size) {
+ // TODO(pbos): Figure out whether this can be moved to common startup code and
+ // not be done per-input.
+ // Remove default logging to prevent huge slowdowns.
+ rtc::LogMessage::LogToDebug(rtc::LS_NONE);
+ webrtc::FuzzOneInput(data, size);
+ return 0;
+}
« webrtc/test/fuzzers/BUILD.gn ('K') | « webrtc/test/fuzzers/vp9_depacketizer_fuzzer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698