Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Unified Diff: pdf/pdfium/fuzzers/pdfium_fuzzer_helper.h

Issue 2754103002: Add XFA pdfium fuzzer (Closed)
Patch Set: seed corpus Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pdf/pdfium/fuzzers/pdfium_fuzzer.cc ('k') | pdf/pdfium/fuzzers/pdfium_fuzzer_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+};
« no previous file with comments | « pdf/pdfium/fuzzers/pdfium_fuzzer.cc ('k') | pdf/pdfium/fuzzers/pdfium_fuzzer_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698