K. Moon | 832a694 | 2022-10-31 20:11:31 +0000 | [diff] [blame] | 1 | // Copyright 2016 The PDFium Authors |
tsepez | 236e47a | 2016-08-22 13:11:21 -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 | 236e47a | 2016-08-22 13:11:21 -0700 | [diff] [blame] | 6 | |
tsepez | 1aff265 | 2016-11-22 10:45:59 -0800 | [diff] [blame] | 7 | #include "core/fpdfapi/page/cpdf_streamparser.h" |
dsinclair | 968a88f | 2016-10-04 13:39:46 -0700 | [diff] [blame] | 8 | #include "core/fpdfapi/parser/cpdf_object.h" |
Lei Zhang | 3793595 | 2024-02-16 04:39:56 +0000 | [diff] [blame] | 9 | #include "core/fxcrt/span.h" |
tsepez | 236e47a | 2016-08-22 13:11:21 -0700 | [diff] [blame] | 10 | |
| 11 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
Tom Sepez | 6058efd | 2018-04-06 23:48:24 +0000 | [diff] [blame] | 12 | CPDF_StreamParser parser(pdfium::make_span(data, size)); |
Tom Sepez | a3097da | 2019-05-01 16:42:36 +0000 | [diff] [blame] | 13 | while (RetainPtr<CPDF_Object> pObj = parser.ReadNextObject(true, false, 0)) |
tsepez | 06104a8 | 2016-11-21 16:22:10 -0800 | [diff] [blame] | 14 | continue; |
tsepez | 236e47a | 2016-08-22 13:11:21 -0700 | [diff] [blame] | 15 | |
| 16 | return 0; |
| 17 | } |