aboutsummaryrefslogtreecommitdiffhomepage
path: root/projects/sqlite3
diff options
context:
space:
mode:
authorGravatar Max Moroz <mmoroz@chromium.org>2016-12-30 12:28:48 +0100
committerGravatar Max Moroz <mmoroz@chromium.org>2016-12-30 12:28:48 +0100
commitd7a8ba21d77086bfc3812c706d81711756489f55 (patch)
tree29211e1ab462333a27a1c33905a0cef79b446100 /projects/sqlite3
parent88388245170d7eeb2e699f357e344dec61a91ec2 (diff)
[sqlite3] limit max memory page count to avoid creating large databases.
Diffstat (limited to 'projects/sqlite3')
-rwxr-xr-xprojects/sqlite3/build.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/projects/sqlite3/build.sh b/projects/sqlite3/build.sh
index 0454019b..7fa3a5fb 100755
--- a/projects/sqlite3/build.sh
+++ b/projects/sqlite3/build.sh
@@ -20,9 +20,11 @@ cd bld
export ASAN_OPTIONS=detect_leaks=0
# Limit max length of data blobs and sql queries to prevent irrelevant OOMs.
+# Also limit max memory page count to avoid creating large databases.
export CFLAGS="$CFLAGS -DSQLITE_MAX_LENGTH=128000000 \
-DSQLITE_MAX_SQL_LENGTH=128000000 \
- -DSQLITE_PRINTF_PRECISION_LIMIT=128000000"
+ -DSQLITE_PRINTF_PRECISION_LIMIT=128000000 \
+ -DSQLITE_MAX_PAGE_COUNT=8092"
../configure
make -j$(nproc)
make sqlite3.c