| 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> | |
| 8 | 7 |
| 9 #include "media/cdm/cenc_utils.h" | 8 #include "components/webcrypto/fuzzer_support.h" |
| 10 | 9 |
| 11 // Entry point for LibFuzzer. | 10 // Entry point for LibFuzzer. |
| 12 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { | 11 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
| 13 std::vector<uint8_t> input(data, data + size); | 12 webcrypto::ImportEcKeyFromDerFuzzData(data, size, |
| 14 media::ValidatePsshInput(input); | 13 blink::WebCryptoKeyFormatPkcs8); |
| 15 return 0; | 14 return 0; |
| 16 } | 15 } |
| OLD | NEW |