mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Check for a failure in the call to sqlite3PagerPagecount() from within
sqlite3PagerWrite(). (Error discovered by valgrind.) FossilOrigin-Name: d64d181c79aee3501be6f7eb8c11ab2cc9a8d63c
This commit is contained in:
@@ -4322,7 +4322,8 @@ int sqlite3PagerWrite(DbPage *pDbPage){
|
||||
*/
|
||||
pg1 = ((pPg->pgno-1) & ~(nPagePerSector-1)) + 1;
|
||||
|
||||
sqlite3PagerPagecount(pPager, (int *)&nPageCount);
|
||||
rc = sqlite3PagerPagecount(pPager, (int *)&nPageCount);
|
||||
if( rc ) return rc;
|
||||
if( pPg->pgno>nPageCount ){
|
||||
nPage = (pPg->pgno - pg1)+1;
|
||||
}else if( (pg1+nPagePerSector-1)>nPageCount ){
|
||||
|
Reference in New Issue
Block a user