mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Early detection of a corrupt R-Tree in the R-Tree search algorithm.
FossilOrigin-Name: 2bf5a4c16457562dc942bcc6ec06d9b4e795ef3ea8e31550e18857bbebd08a76
This commit is contained in:
@ -1595,6 +1595,12 @@ static int rtreeStepToLeaf(RtreeCursor *pCur){
|
||||
x.iLevel = p->iLevel - 1;
|
||||
if( x.iLevel ){
|
||||
x.id = readInt64(pCellData);
|
||||
for(ii=0; ii<pCur->nPoint; ii++){
|
||||
if( pCur->aPoint[ii].id==x.id ){
|
||||
RTREE_IS_CORRUPT(pRtree);
|
||||
return SQLITE_CORRUPT_VTAB;
|
||||
}
|
||||
}
|
||||
x.iCell = 0;
|
||||
}else{
|
||||
x.id = p->id;
|
||||
|
Reference in New Issue
Block a user