From: drh <> Date: Fri, 9 Jan 2026 00:41:35 +0000 (+0000) Subject: Fix potential OOB read on the undocumented test function rtreenode() that X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b93124b6b1c77bdd9e776d422130296b67d2d83;p=thirdparty%2Fsqlite.git Fix potential OOB read on the undocumented test function rtreenode() that is part of the RTREE extension, as described in [forum:/forumpost/2026-01-08T23:32:19Z|forum post 2026-01-08T23:32:19Z]. The problem is almost certainly harmless since any memory allocation will be a multiple of 8 bytes, and once the input buffer size gets rounded up to the next multiple of 8 bytes, the access will still be within bounds. Nevertheless, it still needs to be fixed. FossilOrigin-Name: 9adab8b2bef4130abd358d53384cb5f4dd691b808336bb7102793b0165b1c516 --- diff --git a/ext/rtree/rtree.c b/ext/rtree/rtree.c index 8b913ef2df..b3d29283e5 100644 --- a/ext/rtree/rtree.c +++ b/ext/rtree/rtree.c @@ -3775,7 +3775,7 @@ static void rtreenode(sqlite3_context *ctx, int nArg, sqlite3_value **apArg){ if( node.zData==0 ) return; nData = sqlite3_value_bytes(apArg[1]); if( nData<4 ) return; - if( nData