| Index: third_party/sqlite/BUILD.gn
|
| diff --git a/third_party/sqlite/BUILD.gn b/third_party/sqlite/BUILD.gn
|
| index 2f668b834bababd395553f4751f8d9043c4b24d7..97da41763e0e3cd073109ff37f8effc946d895f5 100644
|
| --- a/third_party/sqlite/BUILD.gn
|
| +++ b/third_party/sqlite/BUILD.gn
|
| @@ -2,6 +2,8 @@
|
| # 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")
|
| +
|
| declare_args() {
|
| # Controls whether the build should uses the version of sqlite3 library
|
| # shipped with the system (currently only supported on iOS) or the one
|
| @@ -34,7 +36,6 @@ if (!use_system_sqlite) {
|
| # "sqlite3" can cause conflicts with the system library.
|
| component("chromium_sqlite3") {
|
| visibility = [ ":*" ]
|
| -
|
| sources = [
|
| "amalgamation/config.h",
|
| "amalgamation/sqlite3.c",
|
| @@ -129,6 +130,14 @@ if (!use_system_sqlite) {
|
| defines += [ "_HAVE_SQLITE_CONFIG_H" ]
|
| }
|
|
|
| + if (using_sanitizer) {
|
| + # Limit max length of data blobs and queries for fuzzing builds by 128 MB.
|
| + defines += [
|
| + "SQLITE_MAX_LENGTH=128000000",
|
| + "SQLITE_MAX_SQL_LENGTH=128000000",
|
| + ]
|
| + }
|
| +
|
| include_dirs = [ "amalgamation" ]
|
|
|
| configs -= [ "//build/config/compiler:chromium_code" ]
|
| @@ -256,3 +265,13 @@ if (use_system_sqlite) {
|
| }
|
| }
|
| }
|
| +
|
| +fuzzer_test("sqlite3_prepare_v2_fuzzer") {
|
| + sources = [
|
| + "fuzz/sqlite3_prepare_v2_fuzzer.cc",
|
| + ]
|
| + deps = [
|
| + ":sqlite",
|
| + ]
|
| + dict = "fuzz/sqlite3_prepare_v2_fuzzer.dict"
|
| +}
|
|
|