Commit Graph

279 Commits

Author SHA1 Message Date
dan
7548ab20e6 In fts5 integrity checks, do not compare the contents of the index against an external content table unless specifically requested.
FossilOrigin-Name: 782163693f37aeb65209bebbaeb6659a36881b8c4b4bec778b366658488bf966
2020-09-21 14:53:21 +00:00
dan
3acd3fb9d8 Fix a "jump depends on unitialized value" valgrind/asan error in fts5.
FossilOrigin-Name: 66f94d623c16b4527e42f0519e32ec78eaf9ee6fd61ee7d0eb657cc59a8f7d68
2020-09-17 14:16:02 +00:00
dan
bbc9e1908a Fix an integer overflow bug in fts5 triggered by a corrupt record.
FossilOrigin-Name: 49da8bdce17ced910b414d50e8df79800513dcf03a196197dc1ea8e47deeda92
2020-07-13 11:06:30 +00:00
mistachkin
8122c6e9be Fix variable declaration issue seen with MSVC.
FossilOrigin-Name: 8a6fe3066cf0599fcf2960e8fb3ae39e4e7a61ec81e8ec71d0b5910aee2c16f6
2020-01-23 00:08:25 +00:00
dan
4fcce747e2 Fix a problem causing fts5 integrity-check failures if numeric values are inserted into a table within a utf-16 database. Fix for [752fdbf6].
FossilOrigin-Name: bae060f382e4386c0793db4aa280fe9cd4893307d17a1801a17218ae4dc031c2
2019-12-24 20:51:01 +00:00
dan
3fee9de239 Fix another case where malformed utf-8 was being mishandled in fts5. Fix for [df46a6f3].
FossilOrigin-Name: 1c0a05b09a97e6e2e9b11c31ed6ec7e6484686614b587ebfd0cfe27d973ba461
2019-12-24 16:20:05 +00:00
dan
84d17bdaa7 Fix an assert() added as part of commit [a11b393dc] that can fail if fts5 database records are corrupt.
FossilOrigin-Name: 4630c1ec013a4c2e54a34c9a64b2c803ac3912450de660497eb34ee21c91f426
2019-12-24 15:35:53 +00:00
dan
c26e78d275 Fix a spurious report of corruption that could be made by the fts5 integrity-check in SQLITE_DEBUG builds if the fts5 index contains malformed utf text.
FossilOrigin-Name: a11b393dc2c882cf0b3c47c3405bf43ca1d6459605bd39cccce4d32da653a72d
2019-12-24 14:27:03 +00:00
dan
ef2df8f343 In fts5, fix a case of overreading a buffer by 1 byte when counting characters in malformed utf-8. Fix for [dd1f67bf].
FossilOrigin-Name: 8d964e1c21d4cea699023e02b0616a75c5859dd083c9365cdcbc0676ebbdaae4
2019-10-24 20:35:27 +00:00
dan
52612bec3c Fix a resource leak in fts5 that could occur if an auxiliary function is called from within a query that does not use the full-text index.
FossilOrigin-Name: b528bdcd45db1b783ecd9739c3d3c890f04de7003f079668970eafaf8e23b2f3
2019-10-20 08:26:08 +00:00
dan
ae55737fbf Do not allow users to effectively disable fts5 crisismerge operations by setting the crisismerge threshold to higher than the maximum allowable segment b-trees on a single level. Fix for [d392017c].
FossilOrigin-Name: 86e497209217abb7bcb491a023cd353f3c7c9c103ebd9f58dd8661b12cf3694c
2019-10-09 18:36:32 +00:00
dan
fbd79cc585 Fix problems with using the fts5 'rebuild' command inside a transaction that contains other updates of the same table. Fix for [e258f008].
FossilOrigin-Name: 238e0835714696aba0631f288fcc30ec5fddb43893d469c6bf017f386b3cddee
2019-10-08 13:34:24 +00:00
dan
b186a622ee Disallow page-sizes smaller than 32 bytes in fts5. Also ensure the fts5 integrity-check works even when "PRAGMA reverse_unordered_selects" is true. Fix for [265e935b26].
FossilOrigin-Name: 8ab0aebdb3c2d6fb3160b2c58ce6cc0495a6ddd960878a6395958c837f3d1b71
2019-10-07 20:36:18 +00:00
dan
4b48c72721 Fix a "jump depends on unititialized value" valgrind error in fts5 triggered by corrupt database records.
FossilOrigin-Name: 6b6751cd90601a1e2744a7d233c973291ecb783801b9327c3b99734dd22bcd27
2019-09-18 11:46:34 +00:00
dan
50b3ea2daf Fix a potential buffer overrun in fts5 caused by corrupted database records.
FossilOrigin-Name: c465d0eb478e42045e08efe8b6fa64d4bd4d747cdf743beae4608562b014169e
2019-08-29 14:25:44 +00:00
dan
298680d15a Fix a potential buffer overrun in fts5 caused by corrupt database records.
FossilOrigin-Name: 156d612800a7282fe0ebb20feb31d3fd577f4ab60fab8c00940c87143997aefb
2019-08-24 17:11:29 +00:00
dan
bfe33f80dd Fix a potential buffer overread in fts5 triggered by a corrupt database record.
FossilOrigin-Name: 16472112b6886ada18d45cfb409cca2e83dde5a8ba8a36d481e87b61100b0186
2019-07-25 19:29:24 +00:00
dan
98d63579be Fix an fts5 segfault that could occur after parsing a corrupt structure record.
FossilOrigin-Name: 600daa9c27206628bf74892376ded35dac11fe0a34894fcd975ad5041a0a0fda
2019-05-24 11:55:01 +00:00
dan
c12655df87 Fix an assert() and potential buffer overrun in fts5 that could occur if the database was corrupt.
FossilOrigin-Name: 8be8bd0d562e571b73a93f4ed18258ebd114bbab67ee3cdcd66a4c8f2987f8dc
2019-05-14 11:33:09 +00:00
dan
d6712f3638 Fix an assert() failure in fts5 that could occur when processing a corrupt database.
FossilOrigin-Name: f158c048be1dc7c80d38787a20495caa55b86416967efd57f4888548d42b4819
2019-05-13 11:52:19 +00:00
drh
f6ad201ac2 Fixes for harmless compiler warnings.
FossilOrigin-Name: c28c973ad6debd63f13e5d4d3da036f680baaec9d863eda039f2747db9f1cfd5
2019-04-13 14:07:57 +00:00
dan
ce3c3eeda0 Fix two assert() statements in fts5 that are only true if the database is not corrupt.
FossilOrigin-Name: edb095a9a679c8c702abd0a487e55ed4b09110b54bcd7d5275020576f2713a39
2019-04-06 15:38:46 +00:00
drh
f3e90dd276 Fix a compiler warning in FTS5.
FossilOrigin-Name: d5acf3af65f9608d4096b9b78289d84b21cd1ea463457f858ffeb20d5bd5d123
2019-03-19 20:13:41 +00:00
dan
b15f19c75e Fix an fts5 problem with interleaving reads and writes in a single transaction.
FossilOrigin-Name: 45c73deb440496e848cb24d4c1326d4105dacfee8bbafb115e567051855e6518
2019-03-18 15:23:20 +00:00
dan
43a6e4d3df Fix another segfault that could occur in fts5 with a corrupted database.
FossilOrigin-Name: 09e337386beb2008eba969f79601d1b8ed953951ce6e43782586e168140d78d2
2019-02-11 16:12:09 +00:00
dan
0062ddd4c9 Fix another potential buffer overread in fts5.
FossilOrigin-Name: 14fba4cc5db2bc206f024bfa5dd82fffdbc7577162da2c3b15a91cc1c91f3846
2019-02-04 14:00:20 +00:00
dan
81f44cdbfb Fix another corruption case in fts5.
FossilOrigin-Name: e608085d3f7e3cc0015fde626e205ee9842ef3cd06dc879fbbc7f2067c592965
2019-02-04 11:54:22 +00:00
dan
8f5b14a5c2 Fix a buffer overread in fts5 debugging scalar function fts5_decode().
FossilOrigin-Name: 54f2399fb2a626602d405c857297f2da833f9f048cbc478f9110bed2e9bda299
2019-02-02 13:47:25 +00:00
dan
1c7d389a23 Fix an assert() in fts5 that could fail if the database is corrupt.
FossilOrigin-Name: 55f06aa3f890dc1dc5c2ed0e6777e46d609a6f9d223d1d4b5813097ce4f4e797
2019-02-01 14:40:44 +00:00
dan
abd7449478 Fix another corrupt-database-handling problem in fts5.
FossilOrigin-Name: 9876ae1b802a449aacbbdd42778653edc19e29315dc627c23ab7493d6492c800
2019-02-01 13:34:00 +00:00
dan
b92b019fe3 Fix another buffer overrun that could occur when quering a corrupt database using an fts5vocab table.
FossilOrigin-Name: b80119bd6044c0993210115732b6ae7b4b0b29c1471b0723bef24f2052c8e671
2019-01-31 14:37:18 +00:00
dan
dd579233e8 Fix another buffer overread in fts5 that may occur when accessing a corrupt database.
FossilOrigin-Name: 760d14374d40bcd9ce3a89771c18dc236c9728553c4747c9b7452ee7b24f4140
2019-01-30 12:15:27 +00:00
dan
3993397e6c Fix a buffer overrun triggered by a merge operation on a corrupt fts5 database.
FossilOrigin-Name: 7ee3cd5b2cdf8db35f70400b3df58f7c421c78ae77c50f22b0ee22d5a3039429
2019-01-29 11:42:43 +00:00
dan
e88609f23e Fix asan warnings in fts5 triggered by corrupt databases - passing NULL to memcmp, out-of-range left-shift values and signed integer overflow.
FossilOrigin-Name: 93f8ec146d63af13f04e337ada4fa75e9254f72b1394df09701ae12e185f27e2
2019-01-25 16:54:06 +00:00
dan
f8f47dd8c5 Fix another fts5 crash that can occur if the database is corrupted.
FossilOrigin-Name: 44ce8baa47192be03c8f11777904c3c07fa5cc5c97b6d8e81572d380995ac688
2019-01-23 19:17:05 +00:00
dan
4c7bdd1597 Fix a buffer overwrite triggered by a prefix query on a corrupt fts5 table.
FossilOrigin-Name: 1d8172a94bce2d067027685e5aa1dc8f5d5d55b5da0832ad2836f6939de68c8f
2019-01-23 12:19:22 +00:00
dan
ccfa550922 Fix a buffer overrun that could occur in fts5 if a prefix query is made on a corrupt database.
FossilOrigin-Name: 1abc4415648e69362061e9f9a4f2c1d419ba33801999b377650d8b9a4d2d3a7c
2019-01-22 21:17:40 +00:00
dan
934d4f7bac Fix another corruption related crash in fts5.
FossilOrigin-Name: 4538d9afe4e6360e20c7b474e77314e5ad293453e1edbe356bf6ea84c05857ee
2019-01-17 20:06:56 +00:00
dan
f66da6ce8e Fix a buffer overwrite that could occur when running an fts5 prefix query
against a corrupt database.

FossilOrigin-Name: 3910b5639d5c96d1840d4feeea64d3a55073531b7365a4e75d9cda6f119f3cfc
2019-01-17 19:11:10 +00:00
dan
951d165125 Fix another problem with handling corrupt records in fts5_decode().
FossilOrigin-Name: 726e398b9ddc15ea1b67c40e2a12ddf5d04428a866699588c5fa1af75af846e1
2019-01-12 20:55:36 +00:00
drh
5d4589014a Improved detection of shadow table corruption in the fts5_decode() SQL function.
FossilOrigin-Name: b74e5f3f3057ee7a98ebcb14ca0751048eacbec8fca3e11e241883029a57ecdf
2019-01-12 00:45:20 +00:00
dan
6ca98ad6b1 Fix a memory leak in fts5 that could occur if scalar function fts5_decode()
was passed a corrupt record.

FossilOrigin-Name: 240f1c0c92cad8a1c19438b38489aedb831f62a4603c53f22367e876d8f644ff
2019-01-10 19:26:52 +00:00
dan
f7d687c9d3 Fix a memory leak in fts5.
FossilOrigin-Name: ff3b011f17f4f02e486f3c8de607f62eddf3b86562e2df82dba57ea166994b65
2019-01-10 18:35:09 +00:00
dan
25e3073741 Avoid use-after-free and double-free errors that could occur if an fts5 table
is modified in certain ways while there are active cursors.

FossilOrigin-Name: 3291b2a6fe6f38ae91b933e5cd2bf7d97432374b4fb1fccd92b4bd759b02ee06
2019-01-10 17:08:20 +00:00
dan
c80864d77a Fix further problems with fts5 handling corrupt databases.
FossilOrigin-Name: 83c467d7af63bd2e7800aff4fe9b09dbd75557460b75a9e07205dfae7e28312c
2019-01-10 15:17:32 +00:00
dan
a47e45f734 Fix an out-of-bounds read in SQL function fts5_decode() that could occur if it
was passed a corrupt record.

FossilOrigin-Name: 931278b257b12ac14fc8fbc82c6dc88ce4ac4b8e0d668543e68f0289d825daa1
2019-01-09 21:12:23 +00:00
drh
2d77d80a65 Use 64-bit math to compute the sizes of memory allocations in extensions.
FossilOrigin-Name: ca67f2ec0e294384c397db438605df1b47aae5f348a8de94f97286997625d169
2019-01-08 20:02:48 +00:00
dan
174c21ff06 Fix further problems with fts5 and corrupt databases causing integer overflow.
FossilOrigin-Name: 673a7dd698eca05bb2909fa01f962a0667361732a6d0e61cf7780ead4a07c967
2019-01-08 08:02:12 +00:00
dan
c210c08891 Fix two more problems with corrupt database handling in fts5.
FossilOrigin-Name: 444c7c99beb9f8b82963e9784aa2be54124c7011f4771122b4f608c02aa26408
2019-01-05 07:17:56 +00:00
dan
2f36262dbf Fix another fts5 assert() that may fail if the database is corrupt.
FossilOrigin-Name: 0888fc2e881d56ccd5222383d1a08cdf16fbd15c40da7ebfc14346be69ffb26a
2019-01-04 11:20:14 +00:00