mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Fix incorrect validation of the size of the BLOB returned by a geometry
function on the RHS of a MATCH operator in RTree. The old code worked for 64-bit systems (by chance) but fails on 32-bit. FossilOrigin-Name: 10cc44f5a63e6cadf6940bb7310a177ee7fa6ee2
This commit is contained in:
@ -1483,9 +1483,7 @@ static int deserializeGeometry(sqlite3_value *pValue, RtreeConstraint *pCons){
|
||||
|
||||
/* Check that the blob is roughly the right size. */
|
||||
nBlob = sqlite3_value_bytes(pValue);
|
||||
if( nBlob<(int)sizeof(RtreeMatchArg)
|
||||
|| ((nBlob-sizeof(RtreeMatchArg))%sizeof(RtreeDValue))!=0
|
||||
){
|
||||
if( nBlob<(int)sizeof(RtreeMatchArg) ){
|
||||
return SQLITE_ERROR;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user