# Copyright 2016 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//testing/libfuzzer/fuzzer_test.gni")
config("dmg_public_config") {
libs = [ "bz2" ]
frameworks = [ "CoreFoundation.framework" ]
}
source_set("dmg_common") {
visibility = [
":*",
"//chrome/utility/safe_browsing:*",
# Unit tests directly use some of the utilities in this target.
"//chrome/test:unit_tests",
]
sources = [
"convert_big_endian.h",
"hfs.cc",
"hfs.h",
"read_stream.cc",
"read_stream.h",
"udif.cc",
"udif.h",
]
deps = [
"//base",
"//third_party/zlib",
]
public_configs = [ ":dmg_public_config" ]
}
executable("crdmg") {
sources = [ "crdmg.cc" ]
deps = [
":dmg_common",
"//base",
"//sandbox/mac:seatbelt",
]
}
fuzzer_test("safe_browsing_dmg_fuzzer") {
sources = [ "dmg_fuzzer.cc" ]
deps = [
":dmg_common",
"//base",
]
}
fuzzer_test("safe_browsing_hfs_fuzzer") {
sources = [ "hfs_fuzzer.cc" ]
deps = [
":dmg_common",
"//base",
]
seed_corpus = rebase_path("//chrome/test/data/safe_browsing/dmg/data")
libfuzzer_options = [ "max_len=1488576" ]
}