/ Check-in [119d1609]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Set a low limit on the length of strings and blobs in the OSSFuzz module, in an effort to avoid timeouts when the fuzzer does things like "randomblob(1e12)".
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 119d1609fa415894fdd0aa19440ca1c658bd01910838a4cfadbe0e304b033bfd
User & Date: drh 2019-01-29 02:37:22
Context
2019-01-29
11:42
Fix a buffer overrun triggered by a merge operation on a corrupt fts5 database. check-in: 7ee3cd5b user: dan tags: trunk
02:37
Set a low limit on the length of strings and blobs in the OSSFuzz module, in an effort to avoid timeouts when the fuzzer does things like "randomblob(1e12)". check-in: 119d1609 user: drh tags: trunk
2019-01-28
19:06
Fix the query planner so that it is able to use an index on a CAST expression. check-in: 2c886f3d user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/ossfuzz.c.

   150    150     cx.iCutoffTime = cx.iLastCb + 10000;  /* Now + 10 seconds */
   151    151   #ifndef SQLITE_OMIT_PROGRESS_CALLBACK
   152    152     sqlite3_progress_handler(cx.db, 10, progress_handler, (void*)&cx);
   153    153   #endif
   154    154   
   155    155     /* Set a limit on the maximum size of a prepared statement */
   156    156     sqlite3_limit(cx.db, SQLITE_LIMIT_VDBE_OP, 25000);
          157  +
          158  +  /* Set a limit on the maximum length of a string or BLOB.  Without this
          159  +  ** limit, fuzzers will invoke randomblob(N) for a large N, and the process
          160  +  ** will timeout trying to generate the huge blob */
          161  +  sqlite3_limit(cx.db, SQLITE_LIMIT_LENGTH, 50000);
   157    162   
   158    163     /* Bit 1 of the selector enables foreign key constraints */
   159    164     sqlite3_db_config(cx.db, SQLITE_DBCONFIG_ENABLE_FKEY, uSelector&1, &rc);
   160    165     uSelector >>= 1;
   161    166   
   162    167     /* Do not allow debugging pragma statements that might cause excess output */
   163    168     sqlite3_set_authorizer(cx.db, block_debug_pragmas, 0);