mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
Be strict about type enforcement on rowid look-ups in the RTREE extension.
Ticket [30e2c183b6b356e4] FossilOrigin-Name: d43e0efb9642037dd751cfed13438e71cfceb50e14a0ec603880c6c3be2e93b1
This commit is contained in:
@ -1817,7 +1817,15 @@ static int rtreeFilter(
|
||||
RtreeSearchPoint *p; /* Search point for the leaf */
|
||||
i64 iRowid = sqlite3_value_int64(argv[0]);
|
||||
i64 iNode = 0;
|
||||
rc = findLeafNode(pRtree, iRowid, &pLeaf, &iNode);
|
||||
int eType = sqlite3_value_numeric_type(argv[0]);
|
||||
if( eType==SQLITE_INTEGER
|
||||
|| (eType==SQLITE_FLOAT && sqlite3_value_double(argv[0])==iRowid)
|
||||
){
|
||||
rc = findLeafNode(pRtree, iRowid, &pLeaf, &iNode);
|
||||
}else{
|
||||
rc = SQLITE_OK;
|
||||
pLeaf = 0;
|
||||
}
|
||||
if( rc==SQLITE_OK && pLeaf!=0 ){
|
||||
p = rtreeSearchPointNew(pCsr, RTREE_ZERO, 0);
|
||||
assert( p!=0 ); /* Always returns pCsr->sPoint */
|
||||
|
Reference in New Issue
Block a user