# Copyright 2016 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. # PDFium fuzzers. import("//third_party/pdfium/pdfium.gni") import("//testing/test.gni") import("//testing/libfuzzer/fuzzer_test.gni") group("fuzzers") { } fuzzer_test("pdfium_fuzzer") { sources = [ "pdfium_fuzzer.cc", "pdfium_fuzzer_helper.cc", "pdfium_fuzzer_helper.h", ] deps = [ "//third_party/pdfium", "//third_party/pdfium:test_support", "//v8", "//v8:v8_libplatform", ] additional_configs = [ "//third_party/pdfium:pdfium_core_config", "//v8:external_startup_data", ] dict = "dicts/pdf.dict" seed_corpus = "//third_party/pdfium/testing/resources" } fuzzer_test("pdf_cmap_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_cmap_fuzzer", ] } fuzzer_test("pdf_codec_a85_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_codec_a85_fuzzer", ] } fuzzer_test("pdf_codec_fax_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_codec_fax_fuzzer", ] } fuzzer_test("pdf_codec_rle_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_codec_rle_fuzzer", ] } fuzzer_test("pdf_codec_icc_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_codec_icc_fuzzer", ] dict = "dicts/pdf_codec_icc.dict" } fuzzer_test("pdf_codec_jbig2_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_codec_jbig2_fuzzer", ] additional_configs = [ "//testing/libfuzzer:no_clusterfuzz" ] } fuzzer_test("pdf_hint_table_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_hint_table_fuzzer", ] } fuzzer_test("pdf_jpx_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_jpx_fuzzer", ] seed_corpus = "corpora/pdf_jpx" } fuzzer_test("pdf_font_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_font_fuzzer", ] } fuzzer_test("pdf_psengine_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_psengine_fuzzer", ] } fuzzer_test("pdf_streamparser_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_streamparser_fuzzer", ] } if (pdf_enable_xfa) { fuzzer_test("pdf_codec_bmp_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_codec_bmp_fuzzer", ] seed_corpus = "corpora/pdf_codec_bmp" additional_configs = [ "//testing/libfuzzer:no_clusterfuzz" ] } fuzzer_test("pdf_codec_gif_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_codec_gif_fuzzer", ] dict = "dicts/pdf_codec_gif.dict" seed_corpus = "corpora/pdf_codec_gif" additional_configs = [ "//testing/libfuzzer:no_clusterfuzz" ] } fuzzer_test("pdf_codec_jpeg_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_codec_jpeg_fuzzer", ] dict = "dicts/pdf_codec_jpeg.dict" seed_corpus = "corpora/pdf_codec_jpeg" } fuzzer_test("pdf_codec_png_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_codec_png_fuzzer", ] dict = "dicts/pdf_codec_png.dict" seed_corpuses = [ "corpora/pdf_codec_png", "//components/viz/test/data", "//third_party/WebKit/LayoutTests/images/png-suite/samples", "//third_party/WebKit/LayoutTests/images/resources/pngfuzz", ] } fuzzer_test("pdf_codec_tiff_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_codec_tiff_fuzzer", ] dict = "dicts/pdf_codec_tiff.dict" seed_corpus = "corpora/pdf_codec_tiff" } fuzzer_test("pdf_css_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_css_fuzzer", ] dict = "dicts/pdf_css.dict" } fuzzer_test("pdf_fm2js_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_fm2js_fuzzer", ] dict = "dicts/pdf_fm2js.dict" } fuzzer_test("pdf_xml_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_xml_fuzzer", ] dict = "dicts/pdf_xml.dict" } fuzzer_test("pdf_cfx_barcode_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_cfx_barcode_fuzzer", ] } fuzzer_test("pdf_cfx_saxreader_fuzzer") { sources = [] deps = [ "//third_party/pdfium/testing/libfuzzer:pdf_cfx_saxreader_fuzzer", ] dict = "dicts/pdf_xml.dict" } fuzzer_test("pdfium_xfa_fuzzer") { sources = [ "pdfium_fuzzer_helper.cc", "pdfium_fuzzer_helper.h", "pdfium_xfa_fuzzer.cc", ] deps = [ "//third_party/pdfium", "//third_party/pdfium:test_support", "//v8", "//v8:v8_libplatform", ] additional_configs = [ "//third_party/pdfium:pdfium_core_config", "//v8:external_startup_data", ] dict = "dicts/pdf.dict" seed_corpus = "//third_party/pdfium/testing/resources" } }