Commit Graph

17 Commits

Author SHA1 Message Date
drh
af3906a798 Many test cases fixed to work with encryption.
FossilOrigin-Name: d866fffb8b1af5003a8730ce7029d1edddb24d46
2016-03-14 17:05:04 +00:00
drh
a23bc8a345 From test scripts, remove stray "breakpoint" commands and blank lines
at the ends of files.

FossilOrigin-Name: a6b35273239669189f33402144f58328b133d182
2016-02-05 16:46:09 +00:00
drh
eeab2c63a9 Fix corner cases involving corrupt varint values in record headers.
FossilOrigin-Name: 3189116b42c5ecef5e30c8b317f4458bbf8b9086
2015-06-19 20:08:39 +00:00
dan
6c1944f659 Update test cases in corruptI.test so that they work with both SQLITE_ENABLE_OVERSIZE_CELL_CHECK and SQLITE_DEFAULT_AUTOVACUUM builds.
FossilOrigin-Name: 22a14663782312fa7f4f18545509ef4b27e9b8c1
2015-05-26 14:57:45 +00:00
dan
fb0246ba8a Return SQLITE_CORRUPT to the user if an attempt is made to add database page 1 to the free page list.
FossilOrigin-Name: 68876003f922635737349f55bc73a78891ea7028
2015-05-26 12:18:17 +00:00
dan
08f901b008 Have the b-tree layer return SQLITE_CORRUPT to any attempt to open a cursor with a root page number less than 1.
FossilOrigin-Name: aa18c8e9d1676b1caa53bc5f5c1dc5f201089b88
2015-05-25 19:24:36 +00:00
dan
0f8076dd69 Fix a couple of btree asserts that would fail when encountering 32-bit rollover in cell payload size fields (cell payloads this large always indicate corruption).
FossilOrigin-Name: 8fa0937a2f3476dd280259e252d6f422c33d38ee
2015-05-25 18:47:26 +00:00
dan
2fc3a6cd98 Fix a case where database corruption may cause SQLite to write past the end of a buffer.
FossilOrigin-Name: 97806a78142b15f89878e25ee70dc5b0524d6793
2015-05-25 17:07:29 +00:00
dan
cf3d17c604 Fix an assert() in btree routine freeSpace() that may be false if the database is corrupt.
FossilOrigin-Name: 00a473c56188cd60a74559effb114140e3fe8a8d
2015-05-25 15:03:49 +00:00
drh
89a5833cb9 Fix the corruptI.test script so that it works with
SQLITE_ENABLE_OVERSIZE_CELL_CHECK and with SQLITE_DEFAULT_AUTOVACUUM=1.

FossilOrigin-Name: e405b9e4a9ef322d84b20e902234b4f6aa196b1b
2014-10-07 20:09:27 +00:00
dan
f216e324f9 Fix an assert that can fail if the database file is corrupted.
FossilOrigin-Name: 3f45b8192dad7fb1f027cbaa694046e3c1b3e278
2014-08-14 19:53:37 +00:00
drh
a1f7c0a21c Enhance the sqlite3VdbeRecordCompare() routines so that if they encounter
database corruption, they will set the UnpackedRecord.isCorrupt field and
return 0.  The sqlite3BtreeMovetoUnpacked() routine detects this and returns
SQLITE_CORRUPT, causing the corruption to be reported back to the top-level.

FossilOrigin-Name: 7fa85eaaaf6d211378620d728a759fdfe30a15b0
2014-03-28 03:12:48 +00:00
dan
68916c9fd3 Add an extra test case for the potential buffer overread patched by [28ddecff04].
FossilOrigin-Name: f585f5d7a0f9bf8c590388654a3638231eba8892
2014-03-26 15:14:59 +00:00
drh
d9c131c366 Add a test case to verify that the previous change avoids excess buffer
overread in sqlite3VdbeRecordCompare().

FossilOrigin-Name: 2b28e8d582cf10936fa1faca04a16ca2eeead66f
2014-03-26 15:05:56 +00:00
drh
182ea4e324 Earlier detection of corruption in sqlite3VdbeRecordCompare() in order to
avoid a potential buffer overread.

FossilOrigin-Name: 28ddecff044dbc2dff50a7d8406ab67dfe06587f
2014-03-26 14:51:07 +00:00
dan
d520041bc0 Do not run corruptI.test with the mmap permutation.
FossilOrigin-Name: 378b290da85cadc1acba081322d1f0e8d7694e17
2014-03-05 11:22:33 +00:00
dan
9b8afef260 Avoid a buffer overread in vdbeCompareRecordInt() that might occur if the database is corrupt.
FossilOrigin-Name: 7c0b4381f0e6f33cb13299a915851d9431bf3850
2014-03-03 20:48:50 +00:00