Fossil SCM
Update the built-in SQLite to a version that fixes a possible UAF following OOM.
Commit
a6d506ecc424277827e7375fc0dc96bef8660703350f4d3ff99798c381dc4880
Parent
c66b038cae2a45d…
2 files changed
+6
-5
+1
-1
+6
-5
| --- extsrc/sqlite3.c | ||
| +++ extsrc/sqlite3.c | ||
| @@ -16,11 +16,11 @@ | ||
| 16 | 16 | ** if you want a wrapper to interface SQLite with your choice of programming |
| 17 | 17 | ** language. The code for the "sqlite3" command-line shell is also in a |
| 18 | 18 | ** separate file. This file contains only code for the core SQLite library. |
| 19 | 19 | ** |
| 20 | 20 | ** The content in this amalgamation comes from Fossil check-in |
| 21 | -** 720387f8604f7cd997f1850ed62ce6ab3260 with changes in files: | |
| 21 | +** 498ee8d514e64cdc93a8d68e1971b6326c61 with changes in files: | |
| 22 | 22 | ** |
| 23 | 23 | ** |
| 24 | 24 | */ |
| 25 | 25 | #ifndef SQLITE_AMALGAMATION |
| 26 | 26 | #define SQLITE_CORE 1 |
| @@ -465,11 +465,11 @@ | ||
| 465 | 465 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 466 | 466 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 467 | 467 | */ |
| 468 | 468 | #define SQLITE_VERSION "3.51.0" |
| 469 | 469 | #define SQLITE_VERSION_NUMBER 3051000 |
| 470 | -#define SQLITE_SOURCE_ID "2025-07-08 20:28:35 720387f8604f7cd997f1850ed62ce6ab32608155d7f02a89c695041caafc4067" | |
| 470 | +#define SQLITE_SOURCE_ID "2025-07-08 22:11:39 498ee8d514e64cdc93a8d68e1971b6326c6132daf25067936bec921c42494caa" | |
| 471 | 471 | |
| 472 | 472 | /* |
| 473 | 473 | ** CAPI3REF: Run-Time Library Version Numbers |
| 474 | 474 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 475 | 475 | ** |
| @@ -152667,14 +152667,15 @@ | ||
| 152667 | 152667 | static SQLITE_NOINLINE void existsToJoin( |
| 152668 | 152668 | Parse *pParse, /* Parsing context */ |
| 152669 | 152669 | Select *p, /* The SELECT statement being optimized */ |
| 152670 | 152670 | Expr *pWhere /* part of the WHERE clause currently being examined */ |
| 152671 | 152671 | ){ |
| 152672 | - if( pWhere | |
| 152672 | + if( pParse->nErr==0 | |
| 152673 | + && pWhere!=0 | |
| 152673 | 152674 | && !ExprHasProperty(pWhere, EP_OuterON|EP_InnerON) |
| 152675 | + && ALWAYS(p->pSrc!=0) | |
| 152674 | 152676 | && p->pSrc->nSrc<BMS |
| 152675 | - && pParse->db->mallocFailed==0 | |
| 152676 | 152677 | ){ |
| 152677 | 152678 | if( pWhere->op==TK_AND ){ |
| 152678 | 152679 | Expr *pRight = pWhere->pRight; |
| 152679 | 152680 | existsToJoin(pParse, p, pWhere->pLeft); |
| 152680 | 152681 | existsToJoin(pParse, p, pRight); |
| @@ -257911,11 +257912,11 @@ | ||
| 257911 | 257912 | int nArg, /* Number of args */ |
| 257912 | 257913 | sqlite3_value **apUnused /* Function arguments */ |
| 257913 | 257914 | ){ |
| 257914 | 257915 | assert( nArg==0 ); |
| 257915 | 257916 | UNUSED_PARAM2(nArg, apUnused); |
| 257916 | - sqlite3_result_text(pCtx, "fts5: 2025-07-08 19:02:26 043ff54fb746c54bc6cfa6aa8c8a32c876c09d36163125916ad01024b98d447b", -1, SQLITE_TRANSIENT); | |
| 257917 | + sqlite3_result_text(pCtx, "fts5: 2025-07-08 22:11:39 498ee8d514e64cdc93a8d68e1971b6326c6132daf25067936bec921c42494caa", -1, SQLITE_TRANSIENT); | |
| 257917 | 257918 | } |
| 257918 | 257919 | |
| 257919 | 257920 | /* |
| 257920 | 257921 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 257921 | 257922 | ** |
| 257922 | 257923 |
| --- extsrc/sqlite3.c | |
| +++ extsrc/sqlite3.c | |
| @@ -16,11 +16,11 @@ | |
| 16 | ** if you want a wrapper to interface SQLite with your choice of programming |
| 17 | ** language. The code for the "sqlite3" command-line shell is also in a |
| 18 | ** separate file. This file contains only code for the core SQLite library. |
| 19 | ** |
| 20 | ** The content in this amalgamation comes from Fossil check-in |
| 21 | ** 720387f8604f7cd997f1850ed62ce6ab3260 with changes in files: |
| 22 | ** |
| 23 | ** |
| 24 | */ |
| 25 | #ifndef SQLITE_AMALGAMATION |
| 26 | #define SQLITE_CORE 1 |
| @@ -465,11 +465,11 @@ | |
| 465 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 466 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 467 | */ |
| 468 | #define SQLITE_VERSION "3.51.0" |
| 469 | #define SQLITE_VERSION_NUMBER 3051000 |
| 470 | #define SQLITE_SOURCE_ID "2025-07-08 20:28:35 720387f8604f7cd997f1850ed62ce6ab32608155d7f02a89c695041caafc4067" |
| 471 | |
| 472 | /* |
| 473 | ** CAPI3REF: Run-Time Library Version Numbers |
| 474 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 475 | ** |
| @@ -152667,14 +152667,15 @@ | |
| 152667 | static SQLITE_NOINLINE void existsToJoin( |
| 152668 | Parse *pParse, /* Parsing context */ |
| 152669 | Select *p, /* The SELECT statement being optimized */ |
| 152670 | Expr *pWhere /* part of the WHERE clause currently being examined */ |
| 152671 | ){ |
| 152672 | if( pWhere |
| 152673 | && !ExprHasProperty(pWhere, EP_OuterON|EP_InnerON) |
| 152674 | && p->pSrc->nSrc<BMS |
| 152675 | && pParse->db->mallocFailed==0 |
| 152676 | ){ |
| 152677 | if( pWhere->op==TK_AND ){ |
| 152678 | Expr *pRight = pWhere->pRight; |
| 152679 | existsToJoin(pParse, p, pWhere->pLeft); |
| 152680 | existsToJoin(pParse, p, pRight); |
| @@ -257911,11 +257912,11 @@ | |
| 257911 | int nArg, /* Number of args */ |
| 257912 | sqlite3_value **apUnused /* Function arguments */ |
| 257913 | ){ |
| 257914 | assert( nArg==0 ); |
| 257915 | UNUSED_PARAM2(nArg, apUnused); |
| 257916 | sqlite3_result_text(pCtx, "fts5: 2025-07-08 19:02:26 043ff54fb746c54bc6cfa6aa8c8a32c876c09d36163125916ad01024b98d447b", -1, SQLITE_TRANSIENT); |
| 257917 | } |
| 257918 | |
| 257919 | /* |
| 257920 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 257921 | ** |
| 257922 |
| --- extsrc/sqlite3.c | |
| +++ extsrc/sqlite3.c | |
| @@ -16,11 +16,11 @@ | |
| 16 | ** if you want a wrapper to interface SQLite with your choice of programming |
| 17 | ** language. The code for the "sqlite3" command-line shell is also in a |
| 18 | ** separate file. This file contains only code for the core SQLite library. |
| 19 | ** |
| 20 | ** The content in this amalgamation comes from Fossil check-in |
| 21 | ** 498ee8d514e64cdc93a8d68e1971b6326c61 with changes in files: |
| 22 | ** |
| 23 | ** |
| 24 | */ |
| 25 | #ifndef SQLITE_AMALGAMATION |
| 26 | #define SQLITE_CORE 1 |
| @@ -465,11 +465,11 @@ | |
| 465 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 466 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 467 | */ |
| 468 | #define SQLITE_VERSION "3.51.0" |
| 469 | #define SQLITE_VERSION_NUMBER 3051000 |
| 470 | #define SQLITE_SOURCE_ID "2025-07-08 22:11:39 498ee8d514e64cdc93a8d68e1971b6326c6132daf25067936bec921c42494caa" |
| 471 | |
| 472 | /* |
| 473 | ** CAPI3REF: Run-Time Library Version Numbers |
| 474 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 475 | ** |
| @@ -152667,14 +152667,15 @@ | |
| 152667 | static SQLITE_NOINLINE void existsToJoin( |
| 152668 | Parse *pParse, /* Parsing context */ |
| 152669 | Select *p, /* The SELECT statement being optimized */ |
| 152670 | Expr *pWhere /* part of the WHERE clause currently being examined */ |
| 152671 | ){ |
| 152672 | if( pParse->nErr==0 |
| 152673 | && pWhere!=0 |
| 152674 | && !ExprHasProperty(pWhere, EP_OuterON|EP_InnerON) |
| 152675 | && ALWAYS(p->pSrc!=0) |
| 152676 | && p->pSrc->nSrc<BMS |
| 152677 | ){ |
| 152678 | if( pWhere->op==TK_AND ){ |
| 152679 | Expr *pRight = pWhere->pRight; |
| 152680 | existsToJoin(pParse, p, pWhere->pLeft); |
| 152681 | existsToJoin(pParse, p, pRight); |
| @@ -257911,11 +257912,11 @@ | |
| 257912 | int nArg, /* Number of args */ |
| 257913 | sqlite3_value **apUnused /* Function arguments */ |
| 257914 | ){ |
| 257915 | assert( nArg==0 ); |
| 257916 | UNUSED_PARAM2(nArg, apUnused); |
| 257917 | sqlite3_result_text(pCtx, "fts5: 2025-07-08 22:11:39 498ee8d514e64cdc93a8d68e1971b6326c6132daf25067936bec921c42494caa", -1, SQLITE_TRANSIENT); |
| 257918 | } |
| 257919 | |
| 257920 | /* |
| 257921 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 257922 | ** |
| 257923 |
+1
-1
| --- extsrc/sqlite3.h | ||
| +++ extsrc/sqlite3.h | ||
| @@ -146,11 +146,11 @@ | ||
| 146 | 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | 148 | */ |
| 149 | 149 | #define SQLITE_VERSION "3.51.0" |
| 150 | 150 | #define SQLITE_VERSION_NUMBER 3051000 |
| 151 | -#define SQLITE_SOURCE_ID "2025-07-08 20:28:35 720387f8604f7cd997f1850ed62ce6ab32608155d7f02a89c695041caafc4067" | |
| 151 | +#define SQLITE_SOURCE_ID "2025-07-08 22:11:39 498ee8d514e64cdc93a8d68e1971b6326c6132daf25067936bec921c42494caa" | |
| 152 | 152 | |
| 153 | 153 | /* |
| 154 | 154 | ** CAPI3REF: Run-Time Library Version Numbers |
| 155 | 155 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 156 | 156 | ** |
| 157 | 157 |
| --- extsrc/sqlite3.h | |
| +++ extsrc/sqlite3.h | |
| @@ -146,11 +146,11 @@ | |
| 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | */ |
| 149 | #define SQLITE_VERSION "3.51.0" |
| 150 | #define SQLITE_VERSION_NUMBER 3051000 |
| 151 | #define SQLITE_SOURCE_ID "2025-07-08 20:28:35 720387f8604f7cd997f1850ed62ce6ab32608155d7f02a89c695041caafc4067" |
| 152 | |
| 153 | /* |
| 154 | ** CAPI3REF: Run-Time Library Version Numbers |
| 155 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 156 | ** |
| 157 |
| --- extsrc/sqlite3.h | |
| +++ extsrc/sqlite3.h | |
| @@ -146,11 +146,11 @@ | |
| 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | */ |
| 149 | #define SQLITE_VERSION "3.51.0" |
| 150 | #define SQLITE_VERSION_NUMBER 3051000 |
| 151 | #define SQLITE_SOURCE_ID "2025-07-08 22:11:39 498ee8d514e64cdc93a8d68e1971b6326c6132daf25067936bec921c42494caa" |
| 152 | |
| 153 | /* |
| 154 | ** CAPI3REF: Run-Time Library Version Numbers |
| 155 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 156 | ** |
| 157 |