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

Unified Diff: media/formats/mp4/mp4_avcc_parser_fuzzer.cc

Issue 2401963003: Add a fuzzer target for MP4 AVCC record parsing (Closed)
Patch Set: condition target on proprietary codecs 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 | « media/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp4/mp4_avcc_parser_fuzzer.cc
diff --git a/testing/libfuzzer/fuzzers/empty_fuzzer.cc b/media/formats/mp4/mp4_avcc_parser_fuzzer.cc
similarity index 50%
copy from testing/libfuzzer/fuzzers/empty_fuzzer.cc
copy to media/formats/mp4/mp4_avcc_parser_fuzzer.cc
index fb38e8023a01c9f3b6f93bba73dd68fcedbaa487..4d5c5742b7238dc18381cc7385cb9576eabc6c2f 100644
--- a/testing/libfuzzer/fuzzers/empty_fuzzer.cc
+++ b/media/formats/mp4/mp4_avcc_parser_fuzzer.cc
@@ -1,25 +1,21 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
+// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Empty fuzzer that doesn't do anything. Used as test and documentation.
-
#include <stddef.h>
#include <stdint.h>
-// Fuzzer entry point.
+#include "base/logging.h"
+#include "media/formats/mp4/box_definitions.h"
+
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- // Run your code on data.
+ media::mp4::AVCDecoderConfigurationRecord().Parse(data, size);
return 0;
}
-// Environment is optional.
+// For disabling noisy logging.
struct Environment {
- Environment() {
- // Initialize your environment.
- }
+ Environment() { logging::SetMinLogLevel(logging::LOG_FATAL); }
};
Environment* env = new Environment();
-
-
« no previous file with comments | « media/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698