• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include <stdint.h>
6 
7 #include "testing/fuzzers/pdfium_fuzzer_helper.h"
8 
9 class PDFiumFuzzer : public PDFiumFuzzerHelper {
10  public:
11   PDFiumFuzzer() = default;
12   ~PDFiumFuzzer() override = default;
13 
GetFormCallbackVersion() const14   int GetFormCallbackVersion() const override { return 1; }
15 };
16 
LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)17 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
18   PDFiumFuzzer fuzzer;
19   fuzzer.RenderPdf(reinterpret_cast<const char*>(data), size);
20   return 0;
21 }
22