mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Fix a potential null-pointer deference following OOM introduced by
check-in [e39795d7] (unreleased). FossilOrigin-Name: a2f77285fa44df86863eed576271f1030ec60f15480daf175908c5082c27774b
This commit is contained in:
@@ -5716,7 +5716,7 @@ static int allocateBtreePage(
|
||||
}
|
||||
testcase( iTrunk==mxPage );
|
||||
if( iTrunk>mxPage || nSearch++ > n ){
|
||||
rc = SQLITE_CORRUPT_PGNO(pPrevTrunk->pgno);
|
||||
rc = SQLITE_CORRUPT_PGNO(pPrevTrunk ? pPrevTrunk->pgno : 1);
|
||||
}else{
|
||||
rc = btreeGetUnusedPage(pBt, iTrunk, &pTrunk, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user