Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 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 #include <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/logging.h" | |
| 9 #include "media/cdm/cenc_utils.h" | 10 #include "media/cdm/cenc_utils.h" |
| 10 | 11 |
| 12 struct Environment { | |
| 13 Environment() { logging::SetMinLogLevel(logging::LOG_FATAL); } | |
|
inferno
2017/01/19 12:29:45
nit: Move logging::SetMinLogLevel(logging::LOG_FAT
mmoroz
2017/01/19 12:36:52
I wrote it that way initially, but then I've got a
| |
| 14 }; | |
| 15 | |
| 16 Environment* env = new Environment(); | |
| 17 | |
| 11 // Entry point for LibFuzzer. | 18 // Entry point for LibFuzzer. |
| 12 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { | 19 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
| 13 std::vector<uint8_t> input(data, data + size); | 20 std::vector<uint8_t> input(data, data + size); |
| 14 media::ValidatePsshInput(input); | 21 media::ValidatePsshInput(input); |
| 15 return 0; | 22 return 0; |
| 16 } | 23 } |
| OLD | NEW |