blob: 8d89bed4581d1344cd172d681bf937098f99d946 [file] [log] [blame]
K. Moon832a6942022-10-31 20:11:31 +00001// Copyright 2016 The PDFium Authors
tsepez236e47a2016-08-22 13:11:21 -07002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Tom Sepezf7368422021-09-17 21:19:49 +00005#include <stdint.h>
tsepez236e47a2016-08-22 13:11:21 -07006
tsepez1aff2652016-11-22 10:45:59 -08007#include "core/fpdfapi/page/cpdf_streamparser.h"
dsinclair968a88f2016-10-04 13:39:46 -07008#include "core/fpdfapi/parser/cpdf_object.h"
Lei Zhang37935952024-02-16 04:39:56 +00009#include "core/fxcrt/span.h"
tsepez236e47a2016-08-22 13:11:21 -070010
11extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
Tom Sepez6058efd2018-04-06 23:48:24 +000012 CPDF_StreamParser parser(pdfium::make_span(data, size));
Tom Sepeza3097da2019-05-01 16:42:36 +000013 while (RetainPtr<CPDF_Object> pObj = parser.ReadNextObject(true, false, 0))
tsepez06104a82016-11-21 16:22:10 -080014 continue;
tsepez236e47a2016-08-22 13:11:21 -070015
16 return 0;
17}