mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
Fix a potential NULL-pointer deference in RTREE due to corrupt shadow tables.
FossilOrigin-Name: 1fdd3604eef880414682e9e6f74d714520fe1c63f267ec4da752d2dc1da6bf72
This commit is contained in:
@ -2948,8 +2948,12 @@ static int rtreeDeleteRowid(Rtree *pRtree, sqlite3_int64 iDelete){
|
||||
rc = findLeafNode(pRtree, iDelete, &pLeaf, 0);
|
||||
}
|
||||
|
||||
#ifdef CORRUPT_DB
|
||||
assert( pLeaf!=0 || rc!=SQLITE_OK || CORRUPT_DB );
|
||||
#endif
|
||||
|
||||
/* Delete the cell in question from the leaf node. */
|
||||
if( rc==SQLITE_OK ){
|
||||
if( rc==SQLITE_OK && pLeaf ){
|
||||
int rc2;
|
||||
rc = nodeRowidIndex(pRtree, pLeaf, iDelete, &iCell);
|
||||
if( rc==SQLITE_OK ){
|
||||
|
Reference in New Issue
Block a user