OLD | NEW |
(Empty) | |
| 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 // This fuzzer is simplified & cleaned up pdfium/samples/pdfium_test.cc |
| 6 |
| 7 #include "third_party/pdfium/public/fpdf_ext.h" |
| 8 #include "third_party/pdfium/public/fpdf_formfill.h" |
| 9 #include "third_party/pdfium/public/fpdfview.h" |
| 10 #include "v8/include/v8.h" |
| 11 |
| 12 class PDFiumFuzzerHelper { |
| 13 public: |
| 14 virtual ~PDFiumFuzzerHelper(); |
| 15 |
| 16 void RenderPdf(const char* pBuf, size_t len); |
| 17 |
| 18 virtual int GetFormCallbackVersion() const = 0; |
| 19 virtual bool OnFormFillEnvLoaded(FPDF_DOCUMENT doc); |
| 20 |
| 21 protected: |
| 22 PDFiumFuzzerHelper(); |
| 23 |
| 24 private: |
| 25 bool RenderPage(const FPDF_DOCUMENT& doc, |
| 26 const FPDF_FORMHANDLE& form, |
| 27 const int page_index); |
| 28 }; |
OLD | NEW |