]>
git.ipfire.org Git - thirdparty/sqlite.git/log
drh [Fri, 26 Jun 2026 20:40:35 +0000 (20:40 +0000)]
Version 3.53.3 for the reuse-schema-3.53 subbranch
FossilOrigin-Name:
b47ab6f6474dfd6a0b140cdc8f2066bd0a50ece75555eb8f5e0d434485c72efd
drh [Fri, 26 Jun 2026 20:14:12 +0000 (20:14 +0000)]
dan [Fri, 26 Jun 2026 17:36:58 +0000 (17:36 +0000)]
Have API functions sqlite3_serialize, sqlite3_limit, sqlite3_busy_timeout, sqlite3_error_offset, sqlite3_db_name, sqlite3_get_autocommit, sqlite3_errcode, sqlite3_total_changes64, sqlite3_changes64, sqlite3_last_insert_rowid and sqlite3_expired take and hold the database mutex while running.
FossilOrigin-Name:
0d57a60060ee822137f3c1cf7ba1cf40ded024d038981bd51b9cab3bf7f42b2f
drh [Fri, 26 Jun 2026 16:35:35 +0000 (16:35 +0000)]
Update the reuse-schema-3.53 subbranch to include all of the latest patches
in branch-3.53.
FossilOrigin-Name:
1941527ec34fda32acdb896563d22283f599533e3059c98e220ea2a917d6744c
drh [Fri, 26 Jun 2026 15:17:08 +0000 (15:17 +0000)]
Fix both a buffer overread and overwrite in the sessions rebase module.
FossilOrigin-Name:
12d0d2363a3082f68153393ed1aa91264ee987bc9187e7afd131d503f66e4faa
drh [Fri, 26 Jun 2026 14:47:07 +0000 (14:47 +0000)]
Fix parsing of unterminated "[" tokens in the incremental integrity
check extension.
FossilOrigin-Name:
6a55dc85b73ef98f0ef31d7b0740bfe46ebb25653f2dff4eb34074d1b455925a
drh [Fri, 26 Jun 2026 14:22:53 +0000 (14:22 +0000)]
Avoid 32-bit integer overflow in the zipfile extension given
ridiculous arguments.
FossilOrigin-Name:
2e1fdfbcc91da03795d6bb27980a329dc710d5c4c8540aa6e77413e29210be0e
drh [Fri, 26 Jun 2026 14:11:19 +0000 (14:11 +0000)]
Fix a buffer overread that could occur in fts5 within a memcmp() when doing an integrity-check on corrupted records.
FossilOrigin-Name:
f73adcfc87803f373b7c55ec280e3bcae4b9f3a1f3edc2ee21bf12c696a46be4
drh [Fri, 26 Jun 2026 13:55:52 +0000 (13:55 +0000)]
Fix parsing of quoted instantiation arguments in the spellfix extension.
FossilOrigin-Name:
c4af6acfb0d04b418ad089ee619317a631a2dff5c7d45a88f704dbcb006f98d8
drh [Fri, 26 Jun 2026 13:52:02 +0000 (13:52 +0000)]
Fix unbounded whitespace skip in the decimal extension.
FossilOrigin-Name:
9a1729a4840e8640770d557657742355f2723f2dda05efeaaf6641af730c34b8
drh [Fri, 26 Jun 2026 13:36:18 +0000 (13:36 +0000)]
Extra margin to prevent queue overflow in the RTree extension.
FossilOrigin-Name:
27f80408b8a499f50959e21fb1c039c6e430257ac7ceb11f5c3600b120b64258
drh [Fri, 26 Jun 2026 13:07:11 +0000 (13:07 +0000)]
Fix the (non-deliverable, testing-use-only) closure extension so that it
parses quoted instantiation arguments correctly.
FossilOrigin-Name:
edfe25b68a37bde4ae535285a11b24f721fbd76d9af8ee264d62c170f45bf52c
drh [Fri, 26 Jun 2026 12:59:28 +0000 (12:59 +0000)]
Fix the size of an allocation in fts3 to take into account that when merging a phrase doclist, each entry may grow by up to 1 byte if the rhs position of the merged lists is stored.
FossilOrigin-Name:
bbaad09b3d090ba24c2069424d94897ebdef7c5fed13db9383d9cb363e3aa91a
drh [Fri, 26 Jun 2026 10:02:37 +0000 (10:02 +0000)]
Improved detection of corrupt freelist chains on btree pages.
Plus, add assert()s to verify that the min-heap does not overflow
inside of PRAGMA integrity_check.
FossilOrigin-Name:
1a888ea60be20a80e85a108a74dab0dd9faf72ca89389defeeb9c99ecafb3ea4
drh [Fri, 26 Jun 2026 02:03:54 +0000 (02:03 +0000)]
dan [Thu, 25 Jun 2026 14:47:46 +0000 (14:47 +0000)]
Have sqlite3_drop_modules() take the database mutex.
FossilOrigin-Name:
7927329d25caab7f607c8857bc6b6fc56a9ba99fbd15087076a7983b2369b4eb
drh [Wed, 24 Jun 2026 20:31:41 +0000 (20:31 +0000)]
Check for cells extending too far past the end of a page while search
an index.
FossilOrigin-Name:
6826c17021eb1af5ed4266fc26486532d0fd4fb1494a582a4ff84fb59ecec254
drh [Wed, 24 Jun 2026 20:28:31 +0000 (20:28 +0000)]
When rolling back a journal that contains a super-journal pointer, only attempt to unlink the super-journal if (a) the filename looks like one that SQLite might have generated, and (b) the super-journal contains the name of the journal being rolled back. This is to limit the extent to which SQLite can be caused to delete arbitrary files by supplying it with a crafted hot-journal.
FossilOrigin-Name:
9471fa2c9ce03713b875b3350d65b5ed6e38e501585126bb3b90694800edfb25
drh [Wed, 24 Jun 2026 15:16:53 +0000 (15:16 +0000)]
Fix the sqlite3ParseUri() for improved defenses against ridiculously long
URI inputs causing integer overflow problems.
FossilOrigin-Name:
a9cea5b555eed4315e426ee8168029840cacb165d1fcd5e2d21a105db84dc46e
dan [Wed, 24 Jun 2026 14:27:21 +0000 (14:27 +0000)]
Revert the recent fixes to backup code and instead fix the problem reported by forum post [forum:
15d82885e2 |
15d82885e2 ] (that a call to sqlite3_deserialize() after sqlite3_backup_init() but before the first call to sqlite3_backup_step() on the destination db of a backup could cause a crash) by deferring caching the pointer to the destination Btree until after it is locked.
FossilOrigin-Name:
d9177ed965d1284c1c8d2c6fbb8db0dd89a42909ff0a3c23e2e761a6be419011
dan [Tue, 23 Jun 2026 20:28:51 +0000 (20:28 +0000)]
Merge the fixes for the use-after-free problem caused by executing an ATTACH when a backup operation was active, and for the OOB read in the unused spellfix1 extension.
FossilOrigin-Name:
121a749d0f3d54eef7f35d527f0eed9a2531ac741452ed85d4c49556df8955ea
drh [Tue, 23 Jun 2026 15:16:15 +0000 (15:16 +0000)]
Do not use shared locks on SHM files when the filename is a long DOS-device
path. Only used shared locks for UNC paths. Do not confuse the
long-DOS-device syntax with UNC paths.
[https://bugzilla.mozilla.org/show_bug.cgi?id=
2016438 |Bugzilla
2016438 ].
FossilOrigin-Name:
246f46614fbdbc2609ee1c6fffe446abd6c0121c3e626a1776bf7e09759bc973
drh [Tue, 23 Jun 2026 13:26:15 +0000 (13:26 +0000)]
Fix a NULL pointer dereference that could occur in the unionvtab virtual table if the configuration SQL returned an SQL NULL value in place of a table name.
FossilOrigin-Name:
7e8de3ba28224a293fd1c220c3bf7ac5f721a01125debc5dce39f16745c43c17
drh [Tue, 23 Jun 2026 11:16:22 +0000 (11:16 +0000)]
Fix a NULL pointer dereference that can occur when misusing a extension
virtual table that was created for testing purposes.
FossilOrigin-Name:
ee4f5d82a3347863f2eb544c780d3efcc00bb43d7ea2495aaf21099f73cf800f
drh [Tue, 23 Jun 2026 10:56:26 +0000 (10:56 +0000)]
Fixes for three separate AI-discovered bugs in non-deliverable extensions.
FossilOrigin-Name:
c980094956a348423469015952455a97df3ca08709338aa03ea8bbb418e8af24
stephan [Mon, 22 Jun 2026 10:38:03 +0000 (10:38 +0000)]
Fixes for kvvfs journaling. Bug reports [bugs:
20e208fe172cae4f |2026-06-20T08:49:41Z] and [bugs:
76acc88b573e3a16 |2026-06-20T18:35:54Z].
FossilOrigin-Name:
4c773f5d64246c7c47a569218215787ba2104bc2966c4bbd8907b936e396f6ea
drh [Fri, 19 Jun 2026 12:14:55 +0000 (12:14 +0000)]
Fix a cast in fts3_write so that it is applied as intended.
FossilOrigin-Name:
6c22c34e9a7bc7bb68680de87a73667f21d14bf201990040423afc426c23a4af
drh [Fri, 19 Jun 2026 11:18:51 +0000 (11:18 +0000)]
Fix an fts5 problem causing attempts to create locale=1 tables with more than 115 columns to fail.
FossilOrigin-Name:
4d993e8f5ffe4d34d4b1c579f9d50b60be6a3c6738e1c06d298e43b1222f7a66
drh [Wed, 17 Jun 2026 14:12:07 +0000 (14:12 +0000)]
Fix CLI CSV test cases so that they suppress the CR on windows and thus
work cross-platform. Test case changes only - no changes to code.
FossilOrigin-Name:
89d9120af9b5ff9d2e1ed019270a539a8334c9395ea4035ecc021d90b3ddb764
drh [Wed, 17 Jun 2026 09:46:23 +0000 (09:46 +0000)]
Improved detection of when the alternative windows-compatible main() is
needed in the sqldiff.exe utility.
FossilOrigin-Name:
571846a9c2c9605680eab09ce994ad15908db2933cb104c3a88ddad9c409e6d9
drh [Tue, 16 Jun 2026 13:46:54 +0000 (13:46 +0000)]
Limit VIEW recursion depth to SQLITE_LIMIT_EXPR_DEPTH to prevent
static overflow in malicious schemas with tens of thousands of
levels of recursive views.
FossilOrigin-Name:
38430aa5ed787ab8d24cc4d7f03b5528168e12b1f59ecfce9c471cd755b81cc7
drh [Tue, 16 Jun 2026 12:02:02 +0000 (12:02 +0000)]
Fix instances of potential buffer overflow caused by loading the contents of a stat4 table with an absurd number of samples in a 32-bit build.
FossilOrigin-Name:
c25ac7af868864f9ec05118c3b8f645e9db00d3c7e6963801fc2489e57218e2b
drh [Mon, 15 Jun 2026 16:49:06 +0000 (16:49 +0000)]
Enhance SQLITE_LIMIT_TRIGGER_DEPTH so that it also limits a chain of
distinct triggers during code generation.
FossilOrigin-Name:
b22709dcb3d967e1ad9a8c0bd0ab7335efda0933d643e734d24e8cfc79325249
drh [Mon, 15 Jun 2026 16:46:14 +0000 (16:46 +0000)]
Fix a problem sometimes causing an UPSERT to incorrectly convert an excluded.* column from type REAL to INT in cases where doing so does not cause data loss.
FossilOrigin-Name:
5d344e02887996cded51e4b1febe7a3bb488b0f05465653cc0daac34e8ba036c
drh [Mon, 15 Jun 2026 16:27:51 +0000 (16:27 +0000)]
Improvements to handling of inequality constraints on generate_series().value
against very large floating-point values.
FossilOrigin-Name:
e10ff7cd09e962c207f897c38b83a813a3214fd4ac11e6a71ac577f21ba09fba
drh [Mon, 15 Jun 2026 13:53:44 +0000 (13:53 +0000)]
Avoid a possible buffer overrun in 32-bit builds of fts5 that could occur when processing corrupt records.
FossilOrigin-Name:
3a4667ce36a1548fffff8bbf946d84d6bbd21e7abb216d1f37717de74ce7e2a7
drh [Mon, 15 Jun 2026 11:52:31 +0000 (11:52 +0000)]
Fix a problem that could cause fts5 to return incorrect answers when performing prefix queries on tokens with synonyms.
FossilOrigin-Name:
4f21004f9b5fc9766183a3c4ac44cfeb6cd3e5583fef9176a26fecc2910f8c08
drh [Mon, 15 Jun 2026 10:16:23 +0000 (10:16 +0000)]
Fix rounding behavior in the decimal extension when all leading digits
are 9 and there is not fractional component.
FossilOrigin-Name:
ae568e059bb179343c31baa3c8bcbe1c64fdcbb28b466af4840963c63d6369f5
drh [Sat, 13 Jun 2026 18:17:08 +0000 (18:17 +0000)]
Make the --header option to the CLI sticky, so that it does not get
turned off by subsequence --csv or similar mode change options.
FossilOrigin-Name:
50193066013df50af113576ae0b59af447212472da6d3824ca5aaf7dc9aab3ec
drh [Fri, 12 Jun 2026 18:38:10 +0000 (18:38 +0000)]
When reading a super-journal name from a journal file, allocate a new buffer rather than using Pager.pTmpSpace. This prevents a buffer overrun that could occur when using a VFS with a large sqlite3_vfs.mxPathname value with a database with a small page size.
FossilOrigin-Name:
aa756c803899a95d5473d32ff222950a3f80fcda5384a7b131d3ba2821af10aa
drh [Fri, 12 Jun 2026 16:04:50 +0000 (16:04 +0000)]
Fix a buffer overwrite in fts3 that could occur while processing NEAR queries against corrupt records.
FossilOrigin-Name:
85afd8e291d280ff2124d1650720dd9934271de6efbd5a50eeaf1b621d3d0a6e
drh [Fri, 12 Jun 2026 12:20:36 +0000 (12:20 +0000)]
When using a read-only WAL/SHM, handle a corrupt page size in the WAL
file correctly.
FossilOrigin-Name:
9a79ca31ff2a55af0e5e8c4d2e7126355a93848ebb8c9caa0ab351202726c63d
drh [Fri, 12 Jun 2026 11:45:37 +0000 (11:45 +0000)]
Fix a signed integer overflow that could occur in fts3 when processing corrupt database records.
FossilOrigin-Name:
42fe4d2e8bbb2ff9ebfd8a9b981bd8769f5273bba74cc1795396820f44a443cb
drh [Thu, 11 Jun 2026 23:28:49 +0000 (23:28 +0000)]
Fix a signed-integer overflow in fts5 that might occur when dealing with strategicly corrupted records.
FossilOrigin-Name:
a36fc58e55c100f0c26e4426100c15287dc5613e06d5d1fb43845e3c7cda09df
drh [Thu, 11 Jun 2026 23:26:01 +0000 (23:26 +0000)]
Fix a possible signed integer overflow in the RBU extension given a
maliciously crafted delta.
FossilOrigin-Name:
c40f3e8e789792615b079ea1ca7968d462a12e0cb4405bd74f407c9a4b5c6188
drh [Thu, 11 Jun 2026 23:22:57 +0000 (23:22 +0000)]
Harden code that processes Fossil Deltas against OOM and maliciously
malformed delta blobs.
FossilOrigin-Name:
1657b9716f043e1af426bbd4ed50073b76c7c1b2f147b124b0b32e824bb83eb3
drh [Thu, 11 Jun 2026 23:18:21 +0000 (23:18 +0000)]
Enhance the ".ar -x" command to add the undocumented --debug option and
to give enhanced robustness to deliberately malformed archives.
FossilOrigin-Name:
cd7bb77fdf6c7bad89068d4138f74a950b67a87cc1582de6172b3547519387cb
drh [Thu, 11 Jun 2026 01:37:00 +0000 (01:37 +0000)]
Improved detection of corrupt node IDs in RTree shadow tables.
FossilOrigin-Name:
4e875ae5c3f0cb28fd40be9f1327d7496f95a55785cad68cb37472e4d1c2e6fd
drh [Mon, 8 Jun 2026 19:23:56 +0000 (19:23 +0000)]
Fix four obscure yet separate problems in FTS5.
FossilOrigin-Name:
a6eb055c35f091a8e864c1de3387d389e2bd3025c32596c0b7a78ebdf091898b
drh [Thu, 4 Jun 2026 16:58:53 +0000 (16:58 +0000)]
Disable the vector-IN-SELECT optimization if the number of columns is so
large that it would cause the WhereTerm.nChild column to wrap.
FossilOrigin-Name:
10d9da4f48623419f9abed17cd05cfa08743377926ca96cf6b457dc01ab062e2
drh [Thu, 4 Jun 2026 12:27:17 +0000 (12:27 +0000)]
Fix a crash that could be caused by configuring the pager-cache with a bulk allocation too small to fit even one page.
FossilOrigin-Name:
3be41e17529d34d083463d967bcb7e07515ce0d6ba616a4a04a68f162ba0cf7f
drh [Thu, 4 Jun 2026 11:35:15 +0000 (11:35 +0000)]
Remove the data type ANY added to the shell's CSV imports.
FossilOrigin-Name:
e14e19c1b33b4f4fe7d9008b0f7f8fa9522d901c13124b0eca4b91acd7156d0d
drh [Thu, 4 Jun 2026 11:29:09 +0000 (11:29 +0000)]
drh [Thu, 4 Jun 2026 11:24:28 +0000 (11:24 +0000)]
Fix problems with expressions like "(?,?,?) IN (SELECT c,b,a FROM ...)" when there is an index on columns "c", "b" and "a", but not in that order.
FossilOrigin-Name:
af0bf4ee7778359d96b43605d947b44bbcef9f489732d0890103992cd970c3b5
drh [Thu, 4 Jun 2026 10:28:26 +0000 (10:28 +0000)]
Remove all references to GetNativeSystemInfo() on Windows, which is
[forum:/info/
f01dc61c5febbe19 |reportedly] not available when compiling
with MinGW.
FossilOrigin-Name:
06fcd92e667488b5f7e0f75cbe4c9b59a71713332c4574e348f09fe78c6de7a2
drh [Wed, 3 Jun 2026 19:28:11 +0000 (19:28 +0000)]
Merge the 3.53.2 patch release into the reuse-schema-3.53 branch
FossilOrigin-Name:
2524c2f07a67ad792b1ff70fb702cedae7689a55d1ee3556d527363a9eec8c07
drh [Wed, 3 Jun 2026 19:12:13 +0000 (19:12 +0000)]
drh [Wed, 3 Jun 2026 18:51:23 +0000 (18:51 +0000)]
drh [Wed, 3 Jun 2026 16:58:01 +0000 (16:58 +0000)]
Fix a faulty assert() in rtree that could fire when processing an unusually large record.
FossilOrigin-Name:
004d85c5f1bf04409ce85d5131f1d9697f25f531046e60160e78b0bae7f55123
drh [Wed, 3 Jun 2026 16:23:45 +0000 (16:23 +0000)]
Use tail recursion on the larger of the two partitions when doing a
quicksort as part of the implementation of the median() function,
to avoid excess stack usage on pathological inputs.
FossilOrigin-Name:
b8fce837cf633af7e489e9750bcd1764e96f9ad7ea01847d5ef9c7060f01a4bf
drh [Wed, 3 Jun 2026 15:54:58 +0000 (15:54 +0000)]
Fix an integer overflow problem in fts3 that could lead to a buffer overwrite on platforms where size_t is 32-bits.
FossilOrigin-Name:
1389ec7bf6a7f68406adae6fd532497b2496f01fb5b465e18bd683da3f8f53ad
drh [Wed, 3 Jun 2026 15:02:29 +0000 (15:02 +0000)]
Fix another buffer overread in fts5 that could occur when processing
corrupt records.
FossilOrigin-Name:
8427cac76455ecbef224ceaccbb37b79338015bcfe67209ae462f36ffefa8466
drh [Wed, 3 Jun 2026 14:24:19 +0000 (14:24 +0000)]
Fix another potential buffer overrun that could occur in fts5 when
processing corrupt records.
FossilOrigin-Name:
e583a723fa501d0c53ad124b571bcd6a42d76daba1ea983d3a547763c2c94c22
drh [Wed, 3 Jun 2026 13:16:20 +0000 (13:16 +0000)]
Fix a potential UAF bug in the zipfile extension.
FossilOrigin-Name:
46fbc23c16b3d104605f5abe5d7a5e779021e264bde409f2d9939de9b5cb9b37
drh [Wed, 3 Jun 2026 12:04:07 +0000 (12:04 +0000)]
Avoid excessive recursion and stack overflow in fts3 when processing a corrupt
database.
FossilOrigin-Name:
c32ddb6a3fe2b8cd5f8a8a133bd2d4061243a3bc0e7e29a96b4d0e5e6090977f
drh [Wed, 3 Jun 2026 11:30:01 +0000 (11:30 +0000)]
The prefix_length() function should stop at the first NUL terminator.
FossilOrigin-Name:
b5f9dc646df5059e546ceb1404a62aadeff4a33163d9b3758e78a33ff3c23467
drh [Wed, 3 Jun 2026 11:05:22 +0000 (11:05 +0000)]
Make the (unused, untested, and unsupported) ext/misc/compress.c routines
responsive to OOM conditions.
FossilOrigin-Name:
2d1dc1c6c679d920e4f5d79acefbf318183ef37bc65bc78dc50f8512f317c1f5
dan [Tue, 2 Jun 2026 18:23:55 +0000 (18:23 +0000)]
Update the session module so that it can apply changesets containing two or more UPDATE changes that form a dependency loop - so that no single UPDATE can be applied independently without violating a constraint.
FossilOrigin-Name:
919d393a3bc483bf58be1f8d6c2ef70f570d63cc9ad8d8df6a6562fb270ea7e5
drh [Tue, 2 Jun 2026 17:22:20 +0000 (17:22 +0000)]
Merge the latest branch-3.53 fixes into the reuse-schema-3.53 branch.
FossilOrigin-Name:
158991b8ff7824594b21a2f94df0b958e786d0fe0ebc3c0ddaf723ce6df7b088
drh [Tue, 2 Jun 2026 13:44:21 +0000 (13:44 +0000)]
Remove a NEVER() that is actually reachable. This same NEVER() was removed
from trunk at check-in [
0de3d95500b7ecd4 ].
FossilOrigin-Name:
46e74947f155199f5ce2440e8d5f19849d0daeb1d9d47381b0f84388901eab4c
drh [Mon, 1 Jun 2026 18:07:44 +0000 (18:07 +0000)]
Disable transitive WHERE constraints when there are explicit COLLATE
operators.
FossilOrigin-Name:
4c0455efe57d1e3c27327e942a1509de3eb7b0902bc3b90473e2cba8df90139b
drh [Mon, 1 Jun 2026 16:38:10 +0000 (16:38 +0000)]
For expressions of the form "(x, y...) IN (SELECT a, b ...)" where the
result is not true, consider the collation sequences of columns "a" and "b"
when determinining if the result should be false or NULL.
FossilOrigin-Name:
5ceba3fe8d9fb2b1e44a048b6e010d427b7f464b727b58824a2af1b53d57f1ec
drh [Mon, 1 Jun 2026 15:47:23 +0000 (15:47 +0000)]
Fix a minor problem with test case mjournal-3.3.
FossilOrigin-Name:
dc1cc4d908df0e36447d0422ecbbbb6d2f59c7b49243407f8a9602e7bb0d1a00
drh [Mon, 1 Jun 2026 13:48:25 +0000 (13:48 +0000)]
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.
FossilOrigin-Name:
27b4f821c752a65197746952cc168fab6a3aa0039d1a0100e3d8415225b5d4bf
drh [Mon, 1 Jun 2026 13:44:19 +0000 (13:44 +0000)]
Fix an integer overflow that could lead to a buffer overrun in the zipfile
extension.
FossilOrigin-Name:
ae9c99b904a8d1b9745a8f09cb35412e4107f4f24f95cabccc18a777b9e76bdf
drh [Mon, 1 Jun 2026 13:39:15 +0000 (13:39 +0000)]
Extra defenses against integer overflows in the untested, unused, and
unsupported transliterate() SQL extension function found in the
ext/misc/spellfix.c extension.
FossilOrigin-Name:
ca800b1d2d243715426045df0d40ad171aed89182f4a5bb1055787964e74ff3c
drh [Sun, 31 May 2026 15:52:29 +0000 (15:52 +0000)]
Fix the zipfile extension so that ZIP archives containing files whose names
contain embedded \000 bytes do not cause problems.
FossilOrigin-Name:
f6108e2fbdddfa03154a12efab17e5c1d681884ebcdfb6da5c319544601676ed
drh [Sun, 31 May 2026 09:23:09 +0000 (09:23 +0000)]
Fix the format() SQL function so that it reports TOOBIG and NOMEM errors.
Fix a possible integer overflow on %#Q formatting.
FossilOrigin-Name:
cd0c6953cdc3b2952070d4150da9c773da193d6710f41455a5c9832cd944831a
drh [Sat, 30 May 2026 13:25:49 +0000 (13:25 +0000)]
Add a test to ensure an application does not try to create a geopoly
virtual table with too many columns.
FossilOrigin-Name:
00dc6063077080c7922c335f04bc1a34a7c8c8c3e85b8771c3133d264af3119e
drh [Sat, 30 May 2026 10:15:58 +0000 (10:15 +0000)]
Remove the untested and undocumented "scrub" utility program. It was written
in 2016, but made obsolete by the VACUUM INTO command in 2019.
FossilOrigin-Name:
20c458172e0b09f7ada7f8cb8be95450c3988e620cbf6f174470bf8e78dcfbf0
drh [Fri, 29 May 2026 23:17:09 +0000 (23:17 +0000)]
Be sure to do floating-point to text conversions in JSON to the full
17-digits.
FossilOrigin-Name:
9498dade8754909d6fadc8cdff44dafc7770d53a1984ba27a00317ecd7e2f3dd
drh [Thu, 28 May 2026 10:18:42 +0000 (10:18 +0000)]
Fix potential integer overflow in btree overflow page cache computation.
FossilOrigin-Name:
093e23814e35f0cd0a4bded29b79ddecd7835626d9fe627bfbf4eb138403277f
drh [Tue, 26 May 2026 15:09:07 +0000 (15:09 +0000)]
Fix a potential 1-byte overread in sqlite3changeset_invert() when
processing a corrupt buffer.
FossilOrigin-Name:
69554ec4e8354e8573071bc423e2dbd0059058388481be3e76fcb7c0fc1ff467
drh [Tue, 26 May 2026 14:23:36 +0000 (14:23 +0000)]
Fix a 32-bit integer overflow in sqlite3changegroup_change_blob() that
could lead to a buffer overwrite.
FossilOrigin-Name:
f2a8ae2251561f2255c2974914293647cf304c6db79de9da957755fccaf8a8b6
drh [Tue, 26 May 2026 13:57:36 +0000 (13:57 +0000)]
Fix QRF so that it works sensibly with "--wrap 1"
FossilOrigin-Name:
90eb6c22687449441824c7da5741a31e78bb78098c170382b230e851d03212c0
drh [Tue, 26 May 2026 11:46:58 +0000 (11:46 +0000)]
Strength the defense against malicious command-line arguments in the
sqlite3_rsync utility program.
FossilOrigin-Name:
a8d18783fb2dbe9683bb6f3b57ebb3cc3ccf1e5afdd5e14786abf1e4e240f51a
drh [Mon, 25 May 2026 23:47:05 +0000 (23:47 +0000)]
drh [Mon, 25 May 2026 18:53:35 +0000 (18:53 +0000)]
Enhance the defenses against malformed JSONB in the jsonbPayloadSize()
routine.
FossilOrigin-Name:
73dfb252f86807464642037df6ec7353b5b52d8c447837c7c4a6540ec622f29d
drh [Mon, 25 May 2026 18:50:36 +0000 (18:50 +0000)]
Fix a potential 1 byte overwrite that could occur when processing
a carefully crafted super-journal file.
FossilOrigin-Name:
f654fa5ac938bb61d917fc33298052f5bd7a6e5e33b0539ac15cbd45bec023d3
drh [Mon, 25 May 2026 17:23:58 +0000 (17:23 +0000)]
Fix a potential buffer overwrite that could occur when in fts5 when handling corrupt records.
FossilOrigin-Name:
02733fc4bc27df64b50ca5027ac94fc643146efb24bb4fdbcc70c45e1c58c919
drh [Thu, 21 May 2026 15:27:55 +0000 (15:27 +0000)]
Fix the VFSes so that there is no 32-bit integer overflow in the
xShmMap method if the WAL file size exceeds about 25 terabytes, or
if the header is corrupted to make SQLite think that the WAL file size
is that big.
FossilOrigin-Name:
39a72dbe53c94be6784fa042cf093151eff43d67086449a4da975416adde120a
drh [Thu, 21 May 2026 13:39:43 +0000 (13:39 +0000)]
Limit the length of inputs to the spellfix1_editdist() extension
function (not part of the standard SQLite build and rarely used)
to 99999 characters, to avoid any possibility of integer overflow.
FossilOrigin-Name:
e56ac902fa4f1219d3affbe3ac9f822406a58486e456f0200a5d0f47fa4e5b43
drh [Thu, 21 May 2026 13:06:04 +0000 (13:06 +0000)]
A join constraint is not an equivalence unless both operands have the
same collation.
FossilOrigin-Name:
4247f48eec004c311cb046b1e97fbd44bc35d4b09e33c2b930dd3e1baabdb813
drh [Wed, 20 May 2026 15:29:37 +0000 (15:29 +0000)]
Fix a bug causing the session module to dereference a NULL pointer when applying a corrupt changeset.
FossilOrigin-Name:
c813d9b777bedd58005b53d38fa3c235ca56bd57b76424cf9238c01a977a4b3d
drh [Wed, 20 May 2026 11:59:36 +0000 (11:59 +0000)]
Check-in [
0d01c90bd7779192 ] was incomplete in that it did not remove
the incorrect assert() statement. Fixed here.
FossilOrigin-Name:
2e9bb51ae951c421f7e5ed8e55fd6dca8b7d4b8543fd3ba3a9e9f017592c028b
drh [Wed, 20 May 2026 11:56:17 +0000 (11:56 +0000)]
Avoid returning an SQLITE_SCHEMA error from within sqlite3session_diff() if the schema has been recently modified.
FossilOrigin-Name:
15fb7ffe4be49d5242c47bef1b3cad5c923cd7f500896058db4dd257bc7b3924
drh [Wed, 20 May 2026 10:04:04 +0000 (10:04 +0000)]
drh [Wed, 20 May 2026 10:01:25 +0000 (10:01 +0000)]
Fix a potential buffer overread in fts5 that could occur when handling
corrupt records. Improved detection of corrupt fts5 records.
FossilOrigin-Name:
fad98805b7d73abf0cf17919397ac50757a2b888354fcf42b72640a12f32926c
drh [Wed, 20 May 2026 09:36:42 +0000 (09:36 +0000)]
Silently ignore nested porter tokenizers in FTS5. Having nested porter
tokenizers is pointless, but it does use stack space unnecessarily.
FossilOrigin-Name:
8207ca671e1253135e5e36cd123fdcfb4d1f0fcf939d2c94238425fafd38c75a
drh [Tue, 19 May 2026 18:59:39 +0000 (18:59 +0000)]
Prevent integer overflow in the ICU extension.
FossilOrigin-Name:
42ef6f3f4fbe9fce3312259855df53d89e002adb0cf798c4aad074a8b7e988d5