/ Check-in [fa47f4c6]
Login

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

Overview
Comment:Improved detection of cell corruption in sqlite3VdbeRecordCompareWithSkip().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: fa47f4c6589c431cf678560ac33dea6b695052012bea2096b2c92869ed51c688
User & Date: drh 2019-01-11 16:44:16
Context
2019-01-11
17:19
Omit errors about missing SAVEPOINTs when aborting the .archive command in the CLI. check-in: 2a47387b user: drh tags: trunk
16:44
Improved detection of cell corruption in sqlite3VdbeRecordCompareWithSkip(). check-in: fa47f4c6 user: drh tags: trunk
14:46
Fix PRAGMA integrity_check so that it does not cancel the PRAGMA vdbe_debug setting. check-in: aaa3a19f user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbeaux.c.

4247
4248
4249
4250
4251
4252
4253


4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
    szHdr1 = aKey1[0];
    d1 = szHdr1 + sqlite3VdbeSerialTypeLen(s1);
    i = 1;
    pRhs++;
  }else{
    idx1 = getVarint32(aKey1, szHdr1);
    d1 = szHdr1;


    if( d1>(unsigned)nKey1 ){ 
      pPKey2->errCode = (u8)SQLITE_CORRUPT_BKPT;
      return 0;  /* Corruption */
    }
    i = 0;
  }

  VVA_ONLY( mem1.szMalloc = 0; ) /* Only needed by assert() statements */
  assert( pPKey2->pKeyInfo->nAllField>=pPKey2->nField 
       || CORRUPT_DB );
  assert( pPKey2->pKeyInfo->aSortOrder!=0 );
  assert( pPKey2->pKeyInfo->nKeyField>0 );
  assert( idx1<=szHdr1 || CORRUPT_DB );







>
>
|
|
|
|
<
<







4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259


4260
4261
4262
4263
4264
4265
4266
    szHdr1 = aKey1[0];
    d1 = szHdr1 + sqlite3VdbeSerialTypeLen(s1);
    i = 1;
    pRhs++;
  }else{
    idx1 = getVarint32(aKey1, szHdr1);
    d1 = szHdr1;
    i = 0;
  }
  if( d1>(unsigned)nKey1 ){ 
    pPKey2->errCode = (u8)SQLITE_CORRUPT_BKPT;
    return 0;  /* Corruption */
  }



  VVA_ONLY( mem1.szMalloc = 0; ) /* Only needed by assert() statements */
  assert( pPKey2->pKeyInfo->nAllField>=pPKey2->nField 
       || CORRUPT_DB );
  assert( pPKey2->pKeyInfo->aSortOrder!=0 );
  assert( pPKey2->pKeyInfo->nKeyField>0 );
  assert( idx1<=szHdr1 || CORRUPT_DB );

Changes to test/fuzzdata7.db.

cannot compute difference between binary files