1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Remove an ALWAYS on a branch for improved database corruption detection

in btree.c:freeSpace().  Test case found by dbsqlfuzz.

FossilOrigin-Name: 54bf04811951db6c894f272f870e3e41f8f5e05a25c1115efbbdbd0d8bba54be
This commit is contained in:
drh
2020-01-14 16:39:54 +00:00
parent 299b102b93
commit 05e8c5407f
4 changed files with 9 additions and 9 deletions

View File

@@ -1731,7 +1731,7 @@ static int freeSpace(MemPage *pPage, u16 iStart, u16 iSize){
}else{
while( (iFreeBlk = get2byte(&data[iPtr]))<iStart ){
if( iFreeBlk<iPtr+4 ){
if( ALWAYS(iFreeBlk==0) ) break;
if( iFreeBlk==0 ) break; /* TH3: corrupt082.100 */
return SQLITE_CORRUPT_PAGE(pPage);
}
iPtr = iFreeBlk;