| Index: pdf/pdfium/fuzzers/pdfium_fuzzer_helper.h
|
| diff --git a/pdf/pdfium/fuzzers/pdfium_fuzzer_helper.h b/pdf/pdfium/fuzzers/pdfium_fuzzer_helper.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7c4f3a3d7df777ea232513faa35b394561373d70
|
| --- /dev/null
|
| +++ b/pdf/pdfium/fuzzers/pdfium_fuzzer_helper.h
|
| @@ -0,0 +1,28 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// This fuzzer is simplified & cleaned up pdfium/samples/pdfium_test.cc
|
| +
|
| +#include "third_party/pdfium/public/fpdf_ext.h"
|
| +#include "third_party/pdfium/public/fpdf_formfill.h"
|
| +#include "third_party/pdfium/public/fpdfview.h"
|
| +#include "v8/include/v8.h"
|
| +
|
| +class PDFiumFuzzerHelper {
|
| + public:
|
| + virtual ~PDFiumFuzzerHelper();
|
| +
|
| + void RenderPdf(const char* pBuf, size_t len);
|
| +
|
| + virtual int GetFormCallbackVersion() const = 0;
|
| + virtual bool OnFormFillEnvLoaded(FPDF_DOCUMENT doc);
|
| +
|
| + protected:
|
| + PDFiumFuzzerHelper();
|
| +
|
| + private:
|
| + bool RenderPage(const FPDF_DOCUMENT& doc,
|
| + const FPDF_FORMHANDLE& form,
|
| + const int page_index);
|
| +};
|
|
|