mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Prevent a possible crash when trying to recover using a carefully corrupted \
and truncated rollback journal. (Test case in TH3) FossilOrigin-Name: 02828d717e2d97b1f59e9279cea9c06eed4accd4e262606bd90d060449c5a1a3
This commit is contained in:
@@ -1315,6 +1315,7 @@ static int readMasterJournal(sqlite3_file *pJrnl, char *zMaster, u32 nMaster){
|
||||
|| szJ<16
|
||||
|| SQLITE_OK!=(rc = read32bits(pJrnl, szJ-16, &len))
|
||||
|| len>=nMaster
|
||||
|| len>szJ-16
|
||||
|| len==0
|
||||
|| SQLITE_OK!=(rc = read32bits(pJrnl, szJ-12, &cksum))
|
||||
|| SQLITE_OK!=(rc = sqlite3OsRead(pJrnl, aMagic, 8, szJ-8))
|
||||
|
Reference in New Issue
Block a user