mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-27 20:41:58 +03:00
Enhance the RTree module to detect node truncation early and report an error.
FossilOrigin-Name: 66de6f4a9504ec2670b7273de8fb6955c80e03f7f73414ea6b80fd8a99f75976
This commit is contained in:
@ -3437,6 +3437,10 @@ static int getNodeSize(
|
||||
rc = getIntFromStmt(db, zSql, &pRtree->iNodeSize);
|
||||
if( rc!=SQLITE_OK ){
|
||||
*pzErr = sqlite3_mprintf("%s", sqlite3_errmsg(db));
|
||||
}else if( pRtree->iNodeSize<(512-64) ){
|
||||
rc = SQLITE_CORRUPT;
|
||||
*pzErr = sqlite3_mprintf("undersize RTree blobs in \"%q_node\"",
|
||||
pRtree->zName);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user