From d7a8ba21d77086bfc3812c706d81711756489f55 Mon Sep 17 00:00:00 2001 From: Max Moroz Date: Fri, 30 Dec 2016 12:28:48 +0100 Subject: [PATCH] [sqlite3] limit max memory page count to avoid creating large databases. --- projects/sqlite3/build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/sqlite3/build.sh b/projects/sqlite3/build.sh index 0454019b0..7fa3a5fb5 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