SQLite

Check-in [119d1609fa]
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
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 119d1609fa415894fdd0aa19440ca1c658bd01910838a4cfadbe0e304b033bfd
User & Date: drh 2019-01-29 02:37:22.889
Context
2019-01-29
11:42
Fix a buffer overrun triggered by a merge operation on a corrupt fts5 database. (check-in: 7ee3cd5b2c 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: 119d1609fa 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: 2c886f3d49 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/ossfuzz.c.
150
151
152
153
154
155
156





157
158
159
160
161
162
163
  cx.iCutoffTime = cx.iLastCb + 10000;  /* Now + 10 seconds */
#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
  sqlite3_progress_handler(cx.db, 10, progress_handler, (void*)&cx);
#endif

  /* Set a limit on the maximum size of a prepared statement */
  sqlite3_limit(cx.db, SQLITE_LIMIT_VDBE_OP, 25000);






  /* Bit 1 of the selector enables foreign key constraints */
  sqlite3_db_config(cx.db, SQLITE_DBCONFIG_ENABLE_FKEY, uSelector&1, &rc);
  uSelector >>= 1;

  /* Do not allow debugging pragma statements that might cause excess output */
  sqlite3_set_authorizer(cx.db, block_debug_pragmas, 0);







>
>
>
>
>







150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
  cx.iCutoffTime = cx.iLastCb + 10000;  /* Now + 10 seconds */
#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
  sqlite3_progress_handler(cx.db, 10, progress_handler, (void*)&cx);
#endif

  /* 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 length of a string or BLOB.  Without this
  ** limit, fuzzers will invoke randomblob(N) for a large N, and the process
  ** will timeout trying to generate the huge blob */
  sqlite3_limit(cx.db, SQLITE_LIMIT_LENGTH, 50000);

  /* Bit 1 of the selector enables foreign key constraints */
  sqlite3_db_config(cx.db, SQLITE_DBCONFIG_ENABLE_FKEY, uSelector&1, &rc);
  uSelector >>= 1;

  /* Do not allow debugging pragma statements that might cause excess output */
  sqlite3_set_authorizer(cx.db, block_debug_pragmas, 0);