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

Make sure an OOM error on sqlite3PagerPagecount() is detected and reported

out to the interface.

FossilOrigin-Name: 8aecf302a5aac66e43a8cc6c4e0d917f74e9e0de
This commit is contained in:
drh
2010-03-31 23:20:04 +00:00
parent 8d8626fe2b
commit a792dc5c4a
3 changed files with 12 additions and 11 deletions

View File

@@ -4006,7 +4006,8 @@ static int pager_open_journal(Pager *pPager){
if( NEVER(pPager->errCode) ) return pPager->errCode;
testcase( pPager->dbSizeValid==0 );
sqlite3PagerPagecount(pPager, &nPage);
rc = sqlite3PagerPagecount(pPager, &nPage);
if( rc ) return rc;
pPager->pInJournal = sqlite3BitvecCreate(nPage);
if( pPager->pInJournal==0 ){
return SQLITE_NOMEM;