K. Moon | 832a694 | 2022-10-31 20:11:31 +0000 | [diff] [blame] | 1 | // Copyright 2016 The PDFium Authors |
kcwu | a177d1c | 2016-09-26 12:09:30 -0700 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Tom Sepez | f736842 | 2021-09-17 21:19:49 +0000 | [diff] [blame] | 5 | #include <stdint.h> |
kcwu | a177d1c | 2016-09-26 12:09:30 -0700 | [diff] [blame] | 6 | |
Nicolas Pena | 169b301 | 2017-05-26 14:38:03 -0400 | [diff] [blame] | 7 | #include "core/fpdfapi/font/cpdf_cmap.h" |
Tom Sepez | f736842 | 2021-09-17 21:19:49 +0000 | [diff] [blame] | 8 | #include "core/fxcrt/retain_ptr.h" |
Lei Zhang | 3793595 | 2024-02-16 04:39:56 +0000 | [diff] [blame] | 9 | #include "core/fxcrt/span.h" |
kcwu | a177d1c | 2016-09-26 12:09:30 -0700 | [diff] [blame] | 10 | |
| 11 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
Lei Zhang | b440777 | 2019-01-16 19:30:47 +0000 | [diff] [blame] | 12 | if (size > 256 * 1024) |
| 13 | return 0; |
| 14 | |
Lei Zhang | 7843049 | 2019-08-13 18:09:04 +0000 | [diff] [blame] | 15 | pdfium::MakeRetain<CPDF_CMap>(pdfium::make_span(data, size)); |
kcwu | a177d1c | 2016-09-26 12:09:30 -0700 | [diff] [blame] | 16 | return 0; |
| 17 | } |