/ Check-in [8c80b004]
Login

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

Overview
Comment:Earlier detection of corruption while added to the freelist.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8c80b004cae71aaf820a31dba80c100ed162ef5bae845fb4535ff4d3be407500
User & Date: drh 2019-03-25 19:50:19
Context
2019-03-25
21:35
Change the name of the parameter table in the CLI to "sqlite_parameters". Doing so involves adding SQLITE_DBCONFIG_WRITABLE_SCHEMA and allowing the creation of tables whose names begin with "sqlite_" and that are indexed while writable_schema is on. check-in: 24ef3844 user: drh tags: trunk
19:50
Earlier detection of corruption while added to the freelist. check-in: 8c80b004 user: drh tags: trunk
18:44
Fix a faulty assert() statement in balance_nonroot() - the assert() should use get2byteNotZero() instead of get2byte() for the corner case where the number cells is zero on a 65536-byte page. check-in: bcbe7d96 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  6189   6189     int rc;                             /* Return Code */
  6190   6190     int nFree;                          /* Initial number of pages on free-list */
  6191   6191   
  6192   6192     assert( sqlite3_mutex_held(pBt->mutex) );
  6193   6193     assert( CORRUPT_DB || iPage>1 );
  6194   6194     assert( !pMemPage || pMemPage->pgno==iPage );
  6195   6195   
  6196         -  if( iPage<2 ) return SQLITE_CORRUPT_BKPT;
         6196  +  if( iPage<2 || iPage>pBt->nPage ){
         6197  +    return SQLITE_CORRUPT_BKPT;
         6198  +  }
  6197   6199     if( pMemPage ){
  6198   6200       pPage = pMemPage;
  6199   6201       sqlite3PagerRef(pPage->pDbPage);
  6200   6202     }else{
  6201   6203       pPage = btreePageLookup(pBt, iPage);
  6202   6204     }
  6203   6205   

Changes to test/fuzzdata7.db.

cannot compute difference between binary files