| 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();
|
| -
|
| -
|
|
|