K. Moon | 832a694 | 2022-10-31 20:11:31 +0000 | [diff] [blame] | 1 | // Copyright 2016 The PDFium Authors |
tsepez | 7996fe8 | 2016-08-18 14:37:07 -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> |
tsepez | 7996fe8 | 2016-08-18 14:37:07 -0700 | [diff] [blame] | 6 | |
dsinclair | 968a88f | 2016-10-04 13:39:46 -0700 | [diff] [blame] | 7 | #include "core/fpdfapi/page/cpdf_psengine.h" |
Tom Sepez | 5389439 | 2018-04-09 18:30:24 +0000 | [diff] [blame] | 8 | #include "third_party/base/span.h" |
dsinclair | 968a88f | 2016-10-04 13:39:46 -0700 | [diff] [blame] | 9 | |
tsepez | 7996fe8 | 2016-08-18 14:37:07 -0700 | [diff] [blame] | 10 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
| 11 | CPDF_PSEngine engine; |
Tom Sepez | 5389439 | 2018-04-09 18:30:24 +0000 | [diff] [blame] | 12 | if (engine.Parse(pdfium::make_span(data, size))) |
tsepez | 7996fe8 | 2016-08-18 14:37:07 -0700 | [diff] [blame] | 13 | engine.Execute(); |
| 14 | return 0; |
| 15 | } |