mirror of
https://github.com/sqlite/sqlite.git
synced 2025-10-21 11:13:54 +03:00
Reduce the maximum size of LIKE and GLOB patterns in the ossfuzz.c test
module to avoid false-positive infinite loop reports from OSS-Fuzz based on long and complex fuzzer-generated LIKE/GLOB patterns that are not actually infinite loops, but which do take a long time to resolve. FossilOrigin-Name: 53edea286b0a38f4f9c7017276f3a826037919144d517f8c89ef0f35b65af5f1
This commit is contained in:
@@ -155,6 +155,11 @@ int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
/* Set a limit on the maximum size of a prepared statement */
|
||||
sqlite3_limit(cx.db, SQLITE_LIMIT_VDBE_OP, 25000);
|
||||
|
||||
/* Set a limit on the maximum LIKE or GLOB pattern length due to
|
||||
** https://issues.oss-fuzz.com/issues/453240497. The default is 50K
|
||||
** which is causing timeouts in OSS-Fuzz */
|
||||
sqlite3_limit(cx.db, SQLITE_LIMIT_LIKE_PATTERN_LENGTH, 250);
|
||||
|
||||
/* Limit total memory available to SQLite to 20MB */
|
||||
sqlite3_hard_heap_limit64(20000000);
|
||||
|
||||
|
Reference in New Issue
Block a user