diff options
author | Lei Zhang <thestig@chromium.org> | 2018-10-09 22:10:29 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-09 22:10:29 +0000 |
commit | 95860d77fb882317da74ec614ff841fcacdcaa83 (patch) | |
tree | 6ea65f7473d81e909f07afff982c3db3d430076e /testing/fuzzers/BUILD.gn | |
parent | 51948abf13328b9ebe6574d77dcdf1f99e94f0da (diff) | |
download | pdfium-95860d77fb882317da74ec614ff841fcacdcaa83.tar.xz |
Copy some fuzzer code from Chromium into PDFium.
These came from Chromium's pdf/pdfium/fuzzer directory. The code has
been modified to be buildable in standalone PDFium and modernized.
Change-Id: Ia4ddad4a164f798689af4b9f92d41d635901dccb
Reviewed-on: https://pdfium-review.googlesource.com/c/43530
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'testing/fuzzers/BUILD.gn')
-rw-r--r-- | testing/fuzzers/BUILD.gn | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/testing/fuzzers/BUILD.gn b/testing/fuzzers/BUILD.gn index 59211b1758..5a6af69f69 100644 --- a/testing/fuzzers/BUILD.gn +++ b/testing/fuzzers/BUILD.gn @@ -35,6 +35,7 @@ group("fuzzers") { ":pdf_psengine_fuzzer_src", ":pdf_streamparser_fuzzer_src", ":pdf_xml_fuzzer_src", + ":pdfium_fuzzer_src", ] if (pdf_enable_xfa) { deps += [ @@ -44,6 +45,7 @@ group("fuzzers") { ":pdf_css_fuzzer_src", ":pdf_fm2js_fuzzer_src", ":pdf_formcalc_fuzzer_src", + ":pdfium_xfa_fuzzer_src", ] if (pdf_enable_xfa_bmp) { deps += [ ":pdf_codec_bmp_fuzzer_src" ] @@ -78,6 +80,9 @@ template("pdfium_fuzzer") { "//build/config/compiler:no_chromium_code", ":fuzzer_config", ] + if (pdf_enable_v8) { + configs += [ "//v8:external_startup_data" ] + } } } @@ -175,6 +180,19 @@ if (pdf_enable_xfa) { "pdf_formcalc_fuzzer.cc", ] } + + pdfium_fuzzer("pdfium_xfa_fuzzer_src") { + sources = [ + "pdfium_fuzzer_helper.cc", + "pdfium_fuzzer_helper.h", + "pdfium_xfa_fuzzer.cc", + ] + deps = [ + "../../:test_support", + "//v8", + "//v8:v8_libplatform", + ] + } } pdfium_fuzzer("pdf_cmap_fuzzer_src") { @@ -251,3 +269,22 @@ pdfium_fuzzer("pdf_xml_fuzzer_src") { "pdf_xml_fuzzer.cc", ] } + +pdfium_fuzzer("pdfium_fuzzer_src") { + sources = [ + "pdfium_fuzzer.cc", + "pdfium_fuzzer_helper.cc", + "pdfium_fuzzer_helper.h", + ] + + deps = [ + "../../:test_support", + ] + + if (pdf_enable_v8) { + deps += [ + "//v8", + "//v8:v8_libplatform", + ] + } +} |