From: drh <> Date: Mon, 1 Jun 2026 12:36:28 +0000 (+0000) Subject: Do not allow the argument to a table-valued function to reference a table X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=0a04687373580ed5210c099af9ea42583ddbb755;p=thirdparty%2Fsqlite.git Do not allow the argument to a table-valued function to reference a table to its right, even if the SELECT is inside a common table expression. This is a replacement for the fix at [3c0a277e6741c722]. Fix for multiple dbsqlfuzz reports and probably also a fix for [bugs:/info/b6c6fad96c|Bug 2026-06-01T07:23:11Z]. FossilOrigin-Name: d96271db6a3a44e50d1a977250c4cc14178612a6c838e7c51c5f79fda45ae19f --- 0a04687373580ed5210c099af9ea42583ddbb755 diff --cc manifest index 56f4cadeac,ee2c3d5257..232080beb9 --- a/manifest +++ b/manifest @@@ -1,5 -1,5 +1,5 @@@ - C Fix\san\sinteger\soverflow\sthat\scould\slead\sto\sa\sbuffer\soverrun\sin\sthe\szipfile\sextension.\sBug\s[bugs:/info/2026-06-01T10:16:47Z\s|\s2026-06-01T10:16:47Z]. - D 2026-06-01T11:52:23.115 -C Test\scase\sto\sshow\sthat\sthe\schange\sfixes\sthe\soriginal\scarray\sproblem. -D 2026-06-01T12:30:13.018 ++C Do\snot\sallow\sthe\sargument\sto\sa\stable-valued\sfunction\sto\sreference\sa\stable\nto\sits\sright,\seven\sif\sthe\sSELECT\sis\sinside\sa\scommon\stable\sexpression.\nThis\sis\sa\sreplacement\sfor\sthe\sfix\sat\s[3c0a277e6741c722].\s\sFix\nfor\smultiple\sdbsqlfuzz\sreports\sand\sprobably\salso\sa\sfix\nfor\s[bugs:/info/b6c6fad96c|Bug\s2026-06-01T07:23:11Z]. ++D 2026-06-01T12:36:28.828 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@@ -2207,9 -2207,8 +2207,9 @@@ F tool/warnings-clang.sh bbf6a1e685e534 F tool/warnings.sh a554d13f6e5cf3760f041b87939e3d616ec6961859c3245e8ef701d1eafc2ca2 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f F tool/winmain.c 00c8fb88e365c9017db14c73d3c78af62194d9644feaf60e220ab0f411f3604c - P 2b073519b6080abc8872b0728c64827cc088d1b43f132cd2aeb396f06de3d36f cc86820e198db6ee4e62f455d3dd9877d73873aaccad6ceffd0b34452d35c89c - R 6fc3e7ce84a5a456338015adf8a6b339 - T +closed cc86820e198db6ee4e62f455d3dd9877d73873aaccad6ceffd0b34452d35c89c - U dan - Z debaee7cc6e028d3c510d9935b697d9d -P e5bae3687dbb470ead7e8d6bf428b1fbb1e9f10c214bc2a91e93e68fb2ae6ff7 ++P a8dac6af353c02aed8eaaba5921e036d3f3a6639367ae70e8c75d759c7b4ab52 8df6671ae8211b706b7d4f073c5166f0f41f3c11339bc4d28997e8a205a39545 + R 036188abda74603f186880ec3c6e0508 ++T +closed 8df6671ae8211b706b7d4f073c5166f0f41f3c11339bc4d28997e8a205a39545 + U drh -Z e2640165a4faf7eff7fd44fcf98f9320 ++Z 74b67f6f9a60e0c0e5853c749f421547 # Remove this line to create a well-formed Fossil manifest. diff --cc manifest.uuid index 707362aab3,1c5c77c8bf..dfc0f67d7e --- a/manifest.uuid +++ b/manifest.uuid @@@ -1,1 -1,1 +1,1 @@@ - a8dac6af353c02aed8eaaba5921e036d3f3a6639367ae70e8c75d759c7b4ab52 -8df6671ae8211b706b7d4f073c5166f0f41f3c11339bc4d28997e8a205a39545 ++d96271db6a3a44e50d1a977250c4cc14178612a6c838e7c51c5f79fda45ae19f