| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Empty fuzzer that doesn't do anything. Used as test and documentation. | |
| 6 | |
| 7 #include <stddef.h> | 5 #include <stddef.h> |
| 8 #include <stdint.h> | 6 #include <stdint.h> |
| 9 | 7 |
| 10 // Fuzzer entry point. | 8 #include "base/logging.h" |
| 9 #include "media/formats/mp4/box_definitions.h" |
| 10 |
| 11 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { | 11 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
| 12 // Run your code on data. | 12 media::mp4::AVCDecoderConfigurationRecord().Parse(data, size); |
| 13 return 0; | 13 return 0; |
| 14 } | 14 } |
| 15 | 15 |
| 16 // Environment is optional. | 16 // For disabling noisy logging. |
| 17 struct Environment { | 17 struct Environment { |
| 18 Environment() { | 18 Environment() { logging::SetMinLogLevel(logging::LOG_FATAL); } |
| 19 // Initialize your environment. | |
| 20 } | |
| 21 }; | 19 }; |
| 22 | 20 |
| 23 Environment* env = new Environment(); | 21 Environment* env = new Environment(); |
| 24 | |
| 25 | |
| OLD | NEW |