[sqlite3] limit max memory page count to avoid creating large databases.

This commit is contained in:
Max Moroz 2016-12-30 12:28:48 +01:00
parent 8838824517
commit d7a8ba21d7
1 changed files with 3 additions and 1 deletions

View File

@ -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