diff --git a/0003-CVE-2022-35737.patch b/0003-CVE-2022-35737.patch deleted file mode 100644 index 9c6fa5b37a01849ba8bff71e16a69da14d8ea7a8..0000000000000000000000000000000000000000 --- a/0003-CVE-2022-35737.patch +++ /dev/null @@ -1,80 +0,0 @@ -From effc07ec9c6e08d3bd17665f8800054770f8c643 Mon Sep 17 00:00:00 2001 -From: drh <> -Date: Fri, 15 Jul 2022 12:34:31 +0000 -Subject: [PATCH] Fix the whereKeyStats() routine (part of STAT4 processing - only) so that it is able to cope with row-value comparisons against the - primary key index of a WITHOUT ROWID table. - [forum:/forumpost/3607259d3c|Forum post 3607259d3c]. - -FossilOrigin-Name: 2a6f761864a462de5c2d5bc666b82fb0b7e124a03443cd1482620dde344b34bb - ---- - src/where.c | 4 ++-- - test/rowvalue.test | 31 +++++++++++++++++++++++++++++++ - 2 files changed, 33 insertions(+), 2 deletions(-) - -diff --git a/src/where.c b/src/where.c -index de6ea91e3..110eb4845 100644 ---- a/src/where.c -+++ b/src/where.c -@@ -1433,7 +1433,7 @@ static int whereKeyStats( - #endif - assert( pRec!=0 ); - assert( pIdx->nSample>0 ); -- assert( pRec->nField>0 && pRec->nField<=pIdx->nSampleCol ); -+ assert( pRec->nField>0 ); - - /* Do a binary search to find the first sample greater than or equal - ** to pRec. If pRec contains a single field, the set of samples to search -@@ -1479,7 +1479,7 @@ static int whereKeyStats( - ** it is extended to two fields. The duplicates that this creates do not - ** cause any problems. - */ -- nField = pRec->nField; -+ nField = MIN(pRec->nField, pIdx->nSample); - iCol = 0; - iSample = pIdx->nSample * nField; - do{ -diff --git a/test/rowvalue.test b/test/rowvalue.test -index 12fee8237..59b44d938 100644 ---- a/test/rowvalue.test -+++ b/test/rowvalue.test -@@ -751,4 +751,35 @@ do_execsql_test 30.3 { - - - -+# 2022-07-15 -+# https://sqlite.org/forum/forumpost/3607259d3c -+# -+reset_db -+do_execsql_test 33.1 { -+ CREATE TABLE t1(a INT, b INT PRIMARY KEY) WITHOUT ROWID; -+ INSERT INTO t1(a, b) VALUES (0, 1),(15,-7),(3,100); -+ ANALYZE; -+} {} -+do_execsql_test 33.2 { -+ SELECT * FROM t1 WHERE (b,a) BETWEEN (0,5) AND (99,-2); -+} {0 1} -+do_execsql_test 33.3 { -+ SELECT * FROM t1 WHERE (b,a) BETWEEN (-8,5) AND (0,-2); -+} {15 -7} -+do_execsql_test 33.3 { -+ SELECT * FROM t1 WHERE (b,a) BETWEEN (3,5) AND (100,4); -+} {3 100} -+do_execsql_test 33.3 { -+ SELECT * FROM t1 WHERE (b,a) BETWEEN (3,5) AND (100,2); -+} {} -+do_execsql_test 33.3 { -+ SELECT * FROM t1 WHERE (a,b) BETWEEN (-2,99) AND (1,0); -+} {0 1} -+do_execsql_test 33.3 { -+ SELECT * FROM t1 WHERE (a,b) BETWEEN (14,99) AND (16,0); -+} {15 -7} -+do_execsql_test 33.3 { -+ SELECT * FROM t1 WHERE (a,b) BETWEEN (2,99) AND (4,0); -+} {3 100} -+ - finish_test --- -2.25.1 - diff --git a/0004-fix-memory-problem-in-the-rtree-test-suite.patch b/0004-fix-memory-problem-in-the-rtree-test-suite.patch deleted file mode 100644 index 273fbef54f5057cf67b615e09f555ee252d2044d..0000000000000000000000000000000000000000 --- a/0004-fix-memory-problem-in-the-rtree-test-suite.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 3755f418be5c3608a7e0b59488a8e172d443d738 Mon Sep 17 00:00:00 2001 -From: zwtmichael -Date: Tue, 30 Aug 2022 17:02:04 +0800 -Subject: [PATCH] fix memory problem in the rtree test suite - ---- - ext/rtree/test_rtreedoc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ext/rtree/test_rtreedoc.c b/ext/rtree/test_rtreedoc.c -index 119be0e..cdbcb2e 100644 ---- a/ext/rtree/test_rtreedoc.c -+++ b/ext/rtree/test_rtreedoc.c -@@ -324,7 +324,7 @@ static int SQLITE_TCLAPI register_box_query( - } - if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR; - -- pCtx = (BoxQueryCtx*)ckalloc(sizeof(BoxQueryCtx*)); -+ pCtx = (BoxQueryCtx*)ckalloc(sizeof(BoxQueryCtx)); - pCtx->interp = interp; - pCtx->pScript = Tcl_DuplicateObj(objv[2]); - Tcl_IncrRefCount(pCtx->pScript); --- -2.23.0 - diff --git a/0005-fix-integer-overflow-on-gigabyte-string.patch b/0005-fix-integer-overflow-on-gigabyte-string.patch deleted file mode 100644 index 4163eb6dfc8516b83b46c844bc0b97b3230227b1..0000000000000000000000000000000000000000 --- a/0005-fix-integer-overflow-on-gigabyte-string.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 72210cf3c782ff30867d5c78e13900be9904ba76 Mon Sep 17 00:00:00 2001 -From: zwtmichael -Date: Mon, 5 Sep 2022 16:49:05 +0800 -Subject: [PATCH] fix integer overflow on gigabyte string - -Signed-off-by: zwtmichael ---- - src/printf.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/printf.c b/src/printf.c -index e635184..fb3689e 100644 ---- a/src/printf.c -+++ b/src/printf.c -@@ -803,8 +803,8 @@ void sqlite3_str_vappendf( - case etSQLESCAPE: /* %q: Escape ' characters */ - case etSQLESCAPE2: /* %Q: Escape ' and enclose in '...' */ - case etSQLESCAPE3: { /* %w: Escape " characters */ -- int i, j, k, n, isnull; -- int needQuote; -+ i64 i, j, k, n; -+ int needQuote, isnull; - char ch; - char q = ((xtype==etSQLESCAPE3)?'"':'\''); /* Quote character */ - char *escarg; --- -2.25.1 - diff --git a/0006-CVE-2022-46908.patch b/0006-CVE-2022-46908.patch deleted file mode 100644 index db5c22219c7d1389cb1062f650ade5930fc779cd..0000000000000000000000000000000000000000 --- a/0006-CVE-2022-46908.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 040177c01a76ccb631bbe19a445f716f0d7b9458 Mon Sep 17 00:00:00 2001 -From: zwtmichael -Date: Thu, 15 Dec 2022 09:49:15 +0800 -Subject: [PATCH] Fix safe mode authorizer callback to reject disallowed UDFs - -Signed-off-by: zwtmichael ---- - src/shell.c.in | 4 ++-- - test/shell2.test | 11 +++++++++++ - 2 files changed, 13 insertions(+), 2 deletions(-) - -diff --git a/src/shell.c.in b/src/shell.c.in -index 543141c..2c1e013 100644 ---- a/src/shell.c.in -+++ b/src/shell.c.in -@@ -1829,7 +1829,7 @@ static int safeModeAuth( - "zipfile", - "zipfile_cds", - }; -- UNUSED_PARAMETER(zA2); -+ UNUSED_PARAMETER(zA1); - UNUSED_PARAMETER(zA3); - UNUSED_PARAMETER(zA4); - switch( op ){ -@@ -1840,7 +1840,7 @@ static int safeModeAuth( - case SQLITE_FUNCTION: { - int i; - for(i=0; i - 3.42.0-1 +- upgrade to version 3.42.0 + * Fri Jan 13 2023 Wenlong Zhang - 3.37.2-5 - remove fail testcase for loongarch