[sqlite] Limit max length of data blobs and sql queries to prevent OOMs.

This commit is contained in:
Max Moroz 2016-11-11 16:35:11 +01:00
parent 8965f7027d
commit bb643eaa60
1 changed files with 4 additions and 1 deletions

View File

@ -21,6 +21,9 @@ mkdir bld
cd bld
export ASAN_OPTIONS=detect_leaks=0
# Limit max length of data blobs and sql queries to prevent irrelevant OOMs.
export CFLAGS="$CFLAGS -DSQLITE_MAX_LENGTH=128000000 \
-DSQLITE_MAX_SQL_LENGTH=128000000"
../configure
make -j$(nproc)
make sqlite3.c
@ -29,4 +32,4 @@ $CXX $CXXFLAGS -std=c++11 -I. \
/src/sqlite3_fuzzer.cc -o /out/sqlite3_fuzzer \
-lfuzzer ./sqlite3.o $FUZZER_LDFLAGS
cp /src/*.options /src/*.dict /out/
cp /src/*.options /src/*.dict /out/