aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2023-05-03 06:48:08 +0000
committerdrh <>2023-05-03 06:48:08 +0000
commitce2aa8bebe7398d96358715b5004fef3fd2b66f3 (patch)
treed03d2b6f2855a9777c91635f32c210e08b21addb /src
parent681307dc80fbea863772ad602f70c4db640d7435 (diff)
downloadsqlite-ce2aa8bebe7398d96358715b5004fef3fd2b66f3.tar.gz
sqlite-ce2aa8bebe7398d96358715b5004fef3fd2b66f3.zip
If the page size is wrong on the page1 content inside a WAL file, then
running VACUUM could trigger an assert(). This check-in changes that assert() into a branch that returns SQLITE_CORRUPT. [forum:/info/4ef9b37d74d2d2e8|Forum post 4ef9b37d74d2d2e8] FossilOrigin-Name: 0512f82a2cde7447cb348d9fd620f39f2f0e359141903cde20f7ba30b5d34af3
Diffstat (limited to 'src')
-rw-r--r--src/wal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wal.c b/src/wal.c
index 43bae13e0..7e349a789 100644
--- a/src/wal.c
+++ b/src/wal.c
@@ -3710,7 +3710,7 @@ int sqlite3WalFrames(
if( rc ) return rc;
}
}
- assert( (int)pWal->szPage==szPage );
+ if( (int)pWal->szPage!=szPage ) return SQLITE_CORRUPT_BKPT;
/* Setup information needed to write frames into the WAL */
w.pWal = pWal;