summaryrefslogtreecommitdiff
path: root/chromium/pdf/pdfium/fuzzers/pdfium_xfa_fuzzer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/pdf/pdfium/fuzzers/pdfium_xfa_fuzzer.cc')
-rw-r--r--chromium/pdf/pdfium/fuzzers/pdfium_xfa_fuzzer.cc28
1 files changed, 0 insertions, 28 deletions
diff --git a/chromium/pdf/pdfium/fuzzers/pdfium_xfa_fuzzer.cc b/chromium/pdf/pdfium/fuzzers/pdfium_xfa_fuzzer.cc
deleted file mode 100644
index bac055c83e0..00000000000
--- a/chromium/pdf/pdfium/fuzzers/pdfium_xfa_fuzzer.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-// 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.
-
-#include "pdf/pdfium/fuzzers/pdfium_fuzzer_helper.h"
-
-class PDFiumXFAFuzzer : public PDFiumFuzzerHelper {
- public:
- PDFiumXFAFuzzer() : PDFiumFuzzerHelper() {}
- ~PDFiumXFAFuzzer() override {}
-
- int GetFormCallbackVersion() const override { return 2; }
-
- // Return false if XFA doesn't load as otherwise we're duplicating the work
- // done by the non-xfa fuzzer.
- bool OnFormFillEnvLoaded(FPDF_DOCUMENT doc) override {
- int form_type = FPDF_GetFormType(doc);
- if (form_type != FORMTYPE_XFA_FULL && form_type != FORMTYPE_XFA_FOREGROUND)
- return false;
- return FPDF_LoadXFA(doc);
- }
-};
-
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- PDFiumXFAFuzzer fuzzer;
- fuzzer.RenderPdf(reinterpret_cast<const char*>(data), size);
- return 0;
-}