1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Add the SQLITE_DBCONFIG_DEFENSIVE flag.

FossilOrigin-Name: af3f29d49359af2291b1d9e06e0db76fd000fbd24b4ac84d2668a0d1322efd83
This commit is contained in:
drh
2018-11-03 16:09:59 +00:00
parent c6e519f335
commit a296cda016
10 changed files with 54 additions and 18 deletions

View File

@@ -3112,7 +3112,9 @@ static int lockBtree(BtShared *pBt){
pageSize-usableSize);
return rc;
}
if( (pBt->db->flags & SQLITE_WriteSchema)==0 && nPage>nPageFile ){
if( (pBt->db->flags & (SQLITE_WriteSchema|SQLITE_Defensive))==0
&& nPage>nPageFile
){
rc = SQLITE_CORRUPT_BKPT;
goto page1_init_failed;
}