1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-10-23 21:49:02 +03:00
Commit Graph

970 Commits

Author SHA1 Message Date
drh
25ba73bc9a Enhance the ieee754(X,Y) function so that it returns 0.0 even if Y very large.
[bugs:/info/2026-10-23T03:55:14Z|Bug 2026-10-23T03:55:14Z]

FossilOrigin-Name: 7d8cc4d253a4d015a60f89c2b87851dccc53f551272f7f373bd1c65bc55d770d
2026-10-23 11:09:58 +00:00
drh
77207b3d94 Fix the fsdir() table-valued function to better cope with
unreasonable LEVEL constraints.
[bugs:/info/2026-10-21T10:49:41Z|Bug 2026-10-21T10:49:41Z]

FossilOrigin-Name: 3e8932ebf2cec334b4867e0192d22b6de8102eda48f9f6e168fe5d2d24a8db0c
2026-10-21 14:28:22 +00:00
drh
5b61b78f12 Cap the number of entires in a ZIP archive processed by the zipfile
extension at 65535.
[bugs:/info/2026-10-21T10:52:39Z|Bug 2026-10-21T10:52:39Z]

FossilOrigin-Name: decd49e6565bd5105e3b5cbe1067c8992582076a7c4e12cb6f3d089f38aba524
2026-10-21 11:51:52 +00:00
drh
03c38c992a Merge branch-3.54 fixes into trunk
FossilOrigin-Name: 8efb0acad85f6220f576c71530256d62f92dfba5673cdc5e0371f480753f1034
2026-10-20 17:53:47 +00:00
drh
d3d85df39e Enhance the readfile() function in the fileio.c extension so that it
is able to read from pipes.
[bugs:/info/2026-10-20T14:02:37Z|Enhancement request 2026-10-20T14:02:37Z]

FossilOrigin-Name: 49d185f2ac2d01c6b1bd9c20d13628eff3803529faaf969bace3981f6acc7a28
2026-10-20 17:46:19 +00:00
drh
e3a9db8c15 Raise an error if a REGEXP pattern ends with "\\".
[bugs:/info/2026-10-20T13:44:52Z|Bug 2026-10-20T13:44:52Z]

FossilOrigin-Name: 480d6e1a39a2057685260cf8386a3dbef4f391c6d1766a6cded5f8cc4d1a0ec4
2026-10-20 15:42:45 +00:00
drh
a315fb49a2 Fix errors in the decimal_cmp() comparison routine of the decimal extension,
and the corresponding "decimal" collating sequence, as reported by
[bugs:/info/2026-10-19T06:35:26Z|Bug 2026-10-19T06:35:26Z]

FossilOrigin-Name: bf74b51f7e40dd4fbc7bbeba1539a38a0e19252c60ad87d514a09895b47bb506
2026-10-19 23:22:16 +00:00
drh
623bc0b1d5 Fix harmless compiler warnings.
FossilOrigin-Name: a68c9f3e98a7be2e7ac020fcbdf3b39cd9015e1d2fa07d30619c47a05cf7aab4
2026-10-18 21:36:55 +00:00
drh
4e512bf10d Fix the decimal extension to correctly deal with NULL parameters.
[bugs:/info/2026-10-18T14:25:03Z|Bug 2026-10-18T14:25:03Z]

FossilOrigin-Name: 716b63c934156d8b19bda24c5bb544cc3d7d0ef66228150eea0a166d6e8c9caa
2026-10-18 19:42:52 +00:00
drh
94852686fe Merge recent branch-3.54 fixes into trunk.
FossilOrigin-Name: c75eff906c11d8f17ae198e5f6cfea34636df2bde0104440fd0b6983ddb2f918
2026-10-17 12:10:02 +00:00
drh
ea9d6e8419 Fix an incorrect assert() in generate_series(). No impact on non-debug
builds.
[bugs:/info/2026-10-17T09:24:09Z|Bug 2026-10-17T09:24:09Z]

FossilOrigin-Name: c5d67762df0507fe58e035b572623f36efb394d08d322bbdb313a2f0da49c734
2026-10-17 12:03:36 +00:00
drh
6444bb328b Fix a harmless C90 compiler warning in the decimal extension.
FossilOrigin-Name: a7f6aa448f35553952a15608c9b88a03be910304200bcce61e7c38e9a9d9ea0e
2026-10-16 17:58:38 +00:00
drh
848cad0ec0 Deal with harmless 32-bit integer overflow on parameters to some extension
SQL functions.
[bugs:/info/2026-10-15T04:34:08Z|Bug 2026-10-15T04:34:08Z]

FossilOrigin-Name: ca52702835d16afd04e936bc4d57f78f0c4d37f83b19b632122f6a699009ca3c
2026-10-15 21:46:13 +00:00
drh
77b2a47a20 Fix compiler warnings, mostly associated with the new ext/misc/optname.c
extension.

FossilOrigin-Name: 9d1bc870de51a35d2ecb362a728643d751f33efef2399dccd0d64438e8e48979
2026-10-12 22:42:19 +00:00
stephan
891eb44d4d Minor hardening of the fossil delta extension against malformed deltas. Based on suggestions from Dan Mestas.
FossilOrigin-Name: 4528f00d5a189f4cc3a3ecf5b3afa13f103cf438f923e19eb0bbe4c4e369e8ec
2026-10-12 09:49:25 +00:00
drh
4c7729af99 New extension ext/misc/optname.c provides the canonical mapping between
optimization bitmaps and optimization names.  This gives a single point
of edit when there are changes.  Used by the CLI, by testfixture, and by
TH3.

FossilOrigin-Name: 135ed9e2cc9bd37c3e158a488e37f4ce14ffeca44ff12e31f25a6686a2622ca1
2026-10-10 17:40:46 +00:00
drh
82fda1d99a Sanitize "*/" in tables names of the output of the .diskused command
in the CLI, and in sqlite3_analyzer, so that it doesn't prematurely
close the comment. ANT-2026-XQM1QD48

FossilOrigin-Name: bcde8f991a86aed6280c1b6164bc14cc1aff1a966a694a5fb32341ffa0202960
2026-10-08 10:55:33 +00:00
dan
2503dc6182 Avoid marking little-known extension function next_char() as SQLITE_INNOCUOUS by default.
FossilOrigin-Name: 481a1df638aeef163022523f8de590c265f64d078eb070cf262995e8ecb0f690
2026-09-24 17:09:56 +00:00
drh
cd4e52fe73 Improved support for stdcall on 32-bit windows, for legacy.
FossilOrigin-Name: e638307a519c929271682b9d9093e6dbdc90ca9a07d45ca9fc9ee114d6fd02c7
2026-09-18 15:38:29 +00:00
drh
220b580fc7 Fix minor issues with the delta_parse() table-valued function in the
fossildelta.c extension.  Add test cases for the fossildelta.c extension.
[bugs:/info/2026-09-09T10:29:35Z|Bug 2026-09-09T10:29:35Z] and
[bugs:/info/2026-09-09T10:55:54Z|Bug 2026-09-09T10:55:54Z].

FossilOrigin-Name: 737ab94632c7745d3fd1f82894a1c8174db59350a33329660681398dd604c4d0
2026-09-09 13:49:42 +00:00
drh
9ec2b69c0d Fix the ext/misc/compress.c extension such that it compiles independently
of the CLI.

FossilOrigin-Name: 4cd5ecc5b3ea4b86875849ede0c5a072e76331eae3ccac139e51fe7568260b42
2026-08-27 10:01:13 +00:00
drh
b130fc5319 Enhance the tmstmpvfs.c extension so that it tags zero pages in the log file.
FossilOrigin-Name: e9d649b77b14990cdc5440e08fdace6989737f3fd1acfc8b1c1bb72be7022ec0
2026-08-26 12:31:34 +00:00
drh
603233d42e Improved handling of OOM errors in the Windows implementation of the
sqlite3_stdio.c extension.
[bugs:/info/2026-08-25T16:55:53Z|Bug 2026-08-25T16:55:53Z].

FossilOrigin-Name: 555489e4c21f5ab65364c73217ec76202a5c97d2f4d66cf38e00158af13ecad6
2026-08-25 18:16:16 +00:00
drh
e18ff9bf54 Prevent some potential NULL pointer deferences following misuse of the
non-standard amatch extension.
[bugs:/info/2026-08-25T16:47:32Z|Bug 2026-08-25T16:47:32Z].

FossilOrigin-Name: 99b69371a136d71e91b482e97e38bfbc3b0c1a63db6c75af5c83494fd758d4cd
2026-08-25 17:59:05 +00:00
drh
a7969a001d Fix a harmless compiler warning in the non-deliverable normalize.c
extension.  [bugs:/info/2026-08-20T23:33:57Z|Bug 2026-08-20T23:33:57Z].

FossilOrigin-Name: 11a73d18be23f52c83d4b1a81841bef140a3cbd117bf3351c0bd143e0435a17f
2026-08-21 00:31:55 +00:00
drh
c69f996361 Fix the zipvfs virtual table so that it works with UPDATE OR REPLACE.
[bugs:/info/2026-08-19T01:52:09Z|Bug 2026-08-19T01:52:09Z].

FossilOrigin-Name: 1f71a577adfbfe9ca691766b9c97d002720118dbfdee5f16424ecf96b4a40b9b
2026-08-19 15:29:15 +00:00
drh
17e0414503 In the (test and debug use only) qpvtab extension, terminate each string
at the first 0x00 character.
[bugs:/info/2026-08-19T02:29:00Z|Bug 2026-08-19T02:29:00Z].

FossilOrigin-Name: 15192e7a4f6b08dc267b7215e1a126a5e6664e988ad68195195ab164cb63e90e
2026-08-19 15:06:04 +00:00
drh
55bf04a530 Fix the (test and debug use only) vtablog.c extension so that it avoids
NULL pointer dereferences following an OOM fault.
[bugs:/info/2026-08-19T02:38:14Z|Bug 2026-08-19T02:38:14Z].

FossilOrigin-Name: 33296ed1d6cf6ebd7ff6638b20afaad2b0ffd7ed997a70450354034a74e7f643
2026-08-19 13:01:34 +00:00
drh
9ac0c79e11 Use a typecast to fix a possible integer overflow in the
(unsupported) ext/misc/compress.c extension.
[bugs:/info/2026-08-18T09:33:57Z|Bug 2026-08-18T09:33:57Z].

FossilOrigin-Name: d0f1f683b94f90ba111509ec1c108a73388579c870aa740379b28cbb00a2827b
2026-08-18 10:33:46 +00:00
drh
e59c4f9ddd Fix an MSVC compiler warning in the amatch.c extension.
FossilOrigin-Name: 43b23132a1288979063b3121b3f4f0d9d7805323b8e8496508426fa371425338
2026-08-12 20:26:57 +00:00
dan
7a4496c474 Fix a single byte buffer overrun in the approximate_match extension.
FossilOrigin-Name: 7f380be91b75307bd7b57415cb53ca5c01894ff921f2ad23736a8faaff25b907
2026-08-04 13:44:14 +00:00
drh
ee917329f8 Cap constraint values on constraints to the amatch virtual table so
that they fit into a 32-bit signed integer.
[bugs:/info/2026-08-02T13:01:25Z|Bug 2026-08-02T13:01:25Z]

FossilOrigin-Name: 092b87164aa7d097287ad0fee4be8b66cf840043dc3091193824d74f2d54a833
2026-08-02 21:59:03 +00:00
drh
0950d29072 Update the header comment on the zipfile extension to state clearly that
writes to the ZIP archive are non-transaction.  No code changes.
[bugs:/info/2026-08-02T14:03:49Z|Bug 2026-08-02T14:03:49Z].

FossilOrigin-Name: 1b623a6064427e81dffc2897e017accc98243ecaf23c5f4df752d3da91b51be6
2026-08-02 20:17:53 +00:00
drh
4b43e57193 Fix incorrect header comment in the templatevtab.c demo extension.
[bugs:/info/2026-08-02T13:49:50Z|Bug 2026-08-02T13:49:50Z]

FossilOrigin-Name: 1c95c741ca01be4241657f27e5e8697afb46dbc2ca4764a3de5080b04ffa3750
2026-08-02 19:40:20 +00:00
drh
ba60f9c836 Fix typo in column name generation logic of the (debugging use
only) vtablog.c extension.
[bugs:/info/2026-08-02T13:56:56Z|Bug 2026-08-02T13:56:56Z]

FossilOrigin-Name: 42bde30535f43404a5996618ff923dcc8af71b56f72935e9e22ada315a046e72
2026-08-02 19:35:12 +00:00
drh
b94e0e8468 Take care to avoid trying to compute 0.0/0.0 in the diskused extension.
If such a value needs to be displayed, show the result as 0.0.
[bugs:/info/2026-08-02T12:48:58Z|Bug 2026-08-02T12:48:58Z]

FossilOrigin-Name: a455f347c50872518eff46753ded9a6080ece680be4a1fcc9dc747e16521e95c
2026-08-02 18:27:00 +00:00
drh
83e6d3e471 Enhance the (unsupported) closure extension to support 64-bit "depth"
values. [bugs:/info/2026-08-02T13:11:13Z|Bug 2026-08-02T13:11:13Z].

FossilOrigin-Name: fccfd5c410c875c35b72475d442c9c1d384deaef1859ba05586841d6c0909e0d
2026-08-02 17:12:01 +00:00
drh
c59cf28db7 Do not allow the (obsolete and unsupported) closure extension to use itself
as its own reference table.
[bugs:/info/2026-08-02T13:07:40Z|Bug 2026-08-02T13:07:40Z].

FossilOrigin-Name: 5e347561c3f8d271bf47c44473fa4b51b87ccab91b40c33f5aad28990a26e9ba
2026-08-02 16:32:28 +00:00
drh
f034d515b4 The use of sqlite3_set_clientdata() to limit recursion in [4687e04d948b787c]
is incorrect.  Fixed here.

FossilOrigin-Name: bf44a08adc94b8c7c69921a1292d56bec0cbd9f3ac772e31d8ea5866e9f46063
2026-07-31 22:45:45 +00:00
drh
db30b1cbc3 Enforce the 1GiB size limit on appendvfs files.
[bugs:/info/2026-07-29T06:29:52Z|Bug 2026-07-29T06:29:52Z]

FossilOrigin-Name: 180e75e07630b4fa7abdd28ad889e27031071555078989c40a8c10a1d2905338
2026-07-29 23:47:55 +00:00
drh
9c94fcbea8 In the experimental and unsupported amatch.c extension, raise an error
if a cost value is out of range even if the rule that the cost applies
to will never be used.
[bugs:/info/2026-07-29T06:30:13Z|Bug 2026-07-29T06:30:13Z]

FossilOrigin-Name: 86b7a62c5ccf41479a9556e705e3c43973a4033c2db42d298050dcfce121ee05
2026-07-29 18:03:45 +00:00
drh
9b6fbaf4ca Do not allow recursion in extension functions sha1_query() or sha3_query().
[bugs:/info/2026-07-29T06:29:33Z|Bug 2026-07-29T06:29:33Z].

FossilOrigin-Name: 4687e04d948b787cee748279b13774ee1389bb179f8762720631a540f5cd9136
2026-07-29 17:36:16 +00:00
drh
a44c884677 Turn redundant loads of the experimental vfsstat.c extension from a
stack overflow into a harmless no-op.
[bugs:/info/2026-07-29T06:28:47Z|Bug 2026-07-29T06:28:47Z].

FossilOrigin-Name: add89fba2ffe9da5b0305182c97f8408e0dd7d2c3d81f40e0a84f6f79154c5a3
2026-07-29 17:19:00 +00:00
drh
d14c3f15ff Turn redundant registrations of the cksumvfs extension from a stack
overflow into a harmless no-op.
[gugs:/info/2026-07-29T06:28:31Z|Bug 2026-07-29T06:28:31Z]

FossilOrigin-Name: d6453bc80e6e717813f2f5d4a40548cbc25e83e09c209793cacfddb94a408053
2026-07-29 17:08:52 +00:00
drh
37275bc277 Block deep recursion in test extension functions test_eval() and eval().
Does not affect deliverable code.
[bugs:/info/2026-07-29T06:29:11Z|Bug 2026-07-29T06:29:11Z]

FossilOrigin-Name: 3e99c27fe3db76a146bb4a77c08007e6c4598cda7975dd40d4f7f14c3bd914b5
2026-07-29 13:00:37 +00:00
drh
d565536731 Improved comments clarifying operation of the ext/misc/noop.c testing
extension.
[bugs:/info/2026-07-29T06:31:22Z|Bug 2026-07-29T06:31:22Z].

FossilOrigin-Name: c9bb594059c5e7ad6fd04f1b8087910833d89f05ddf1b6eea6bd5590c851c790
2026-07-29 11:28:07 +00:00
drh
67cfb59334 Fix the sha1() extension function so that it interprets zero-length
BLOBs as BLOBs and not as NULL.  Also add a few test cases for that
extension function, which was previously completely untested.
[bugs:/info/2026-07-29T06:31:41Z|Bug 2026-07-29T06:31:41Z].

FossilOrigin-Name: 978d12de384fef985d0363633566304bb20f452dfe8ceb836ca1d353a135f30a
2026-07-29 10:28:44 +00:00
drh
d9305a65c8 Add reference counting to the EditDist3Config object in the spellfix
extension.  This should prevent possible UAF following OOM as
described by [bugs:/info/2026-07-26T07:55:13Z|Bug 2026-07-26T07:55:13Z].

FossilOrigin-Name: 37364eaecc148133de4e5b329e10c70922e65829244b4abd448c0adb5ca40877
2026-07-26 18:45:54 +00:00
drh
1b2a4a37b0 Reduce divergence between ext/misc/fossildelta.c,
the delta code in ext/rbu/sqlite3rbu.c, and Fossil itself.

FossilOrigin-Name: 7f49a7a90eda01753c0dff65197bd7bc48a751e24a46919d30af6e2baf0788fc
2026-07-06 16:26:30 +00:00
drh
b113e89537 Avoid a (harmless) 1-byte OOB read due to malformed inputs in the
normalize.c extension.
[bugs:/info/2026-07-06T13:02:37Z|Bug 2026-07-06T13:02:37Z]

FossilOrigin-Name: b1d7123bc619e3cb9dffa8dd52ba31cc18329b14557d8f2d9e547b729016548c
2026-07-06 13:43:42 +00:00