Fossil SCM

Update the built-in SQLite to a version that fixes a possible UAF following OOM.

drh 2025-07-09 13:52 trunk
Commit a6d506ecc424277827e7375fc0dc96bef8660703350f4d3ff99798c381dc4880
2 files changed +6 -5 +1 -1
--- extsrc/sqlite3.c
+++ extsrc/sqlite3.c
@@ -16,11 +16,11 @@
1616
** if you want a wrapper to interface SQLite with your choice of programming
1717
** language. The code for the "sqlite3" command-line shell is also in a
1818
** separate file. This file contains only code for the core SQLite library.
1919
**
2020
** The content in this amalgamation comes from Fossil check-in
21
-** 720387f8604f7cd997f1850ed62ce6ab3260 with changes in files:
21
+** 498ee8d514e64cdc93a8d68e1971b6326c61 with changes in files:
2222
**
2323
**
2424
*/
2525
#ifndef SQLITE_AMALGAMATION
2626
#define SQLITE_CORE 1
@@ -465,11 +465,11 @@
465465
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
466466
** [sqlite_version()] and [sqlite_source_id()].
467467
*/
468468
#define SQLITE_VERSION "3.51.0"
469469
#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"
471471
472472
/*
473473
** CAPI3REF: Run-Time Library Version Numbers
474474
** KEYWORDS: sqlite3_version sqlite3_sourceid
475475
**
@@ -152667,14 +152667,15 @@
152667152667
static SQLITE_NOINLINE void existsToJoin(
152668152668
Parse *pParse, /* Parsing context */
152669152669
Select *p, /* The SELECT statement being optimized */
152670152670
Expr *pWhere /* part of the WHERE clause currently being examined */
152671152671
){
152672
- if( pWhere
152672
+ if( pParse->nErr==0
152673
+ && pWhere!=0
152673152674
&& !ExprHasProperty(pWhere, EP_OuterON|EP_InnerON)
152675
+ && ALWAYS(p->pSrc!=0)
152674152676
&& p->pSrc->nSrc<BMS
152675
- && pParse->db->mallocFailed==0
152676152677
){
152677152678
if( pWhere->op==TK_AND ){
152678152679
Expr *pRight = pWhere->pRight;
152679152680
existsToJoin(pParse, p, pWhere->pLeft);
152680152681
existsToJoin(pParse, p, pRight);
@@ -257911,11 +257912,11 @@
257911257912
int nArg, /* Number of args */
257912257913
sqlite3_value **apUnused /* Function arguments */
257913257914
){
257914257915
assert( nArg==0 );
257915257916
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);
257917257918
}
257918257919
257919257920
/*
257920257921
** Implementation of fts5_locale(LOCALE, TEXT) function.
257921257922
**
257922257923
--- 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
--- extsrc/sqlite3.h
+++ extsrc/sqlite3.h
@@ -146,11 +146,11 @@
146146
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147147
** [sqlite_version()] and [sqlite_source_id()].
148148
*/
149149
#define SQLITE_VERSION "3.51.0"
150150
#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"
152152
153153
/*
154154
** CAPI3REF: Run-Time Library Version Numbers
155155
** KEYWORDS: sqlite3_version sqlite3_sourceid
156156
**
157157
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button