Compare commits
112
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0ec09d417 | ||
|
|
a88f4c308c | ||
|
|
a64a525169 | ||
|
|
347848fa14 | ||
|
|
928f32f54d | ||
|
|
56bc0cbcce | ||
|
|
418511d548 | ||
|
|
a4cd646a0c | ||
|
|
40cd9b59ce | ||
|
|
d5a9995a67 | ||
|
|
3b8ef70260 | ||
|
|
29347b1527 | ||
|
|
36052db9a0 | ||
|
|
d5bf7b294a | ||
|
|
4255fd05db | ||
|
|
8222faba44 | ||
|
|
b6baf940d4 | ||
|
|
76b8dd730a | ||
|
|
7d7e9e3d73 | ||
|
|
7cae1352c1 | ||
|
|
d8002ef402 | ||
|
|
538587881d | ||
|
|
419bd31973 | ||
|
|
c135d8d9cf | ||
|
|
a5ad049268 | ||
|
|
ae04b38c7e | ||
|
|
281ace3ce4 | ||
|
|
fa6537c498 | ||
|
|
70773bbab5 | ||
|
|
17f47bf553 | ||
|
|
c7b6d9b65f | ||
|
|
80491f4558 | ||
|
|
b5acf1da61 | ||
|
|
4cbaf5da18 | ||
|
|
d81186e427 | ||
|
|
d0aa7d2f6e | ||
|
|
518b78e0c5 | ||
|
|
e27e46aeb6 | ||
|
|
77937f0d9f | ||
|
|
52f8d4d496 | ||
|
|
9e1b3629dc | ||
|
|
5442a2c86a | ||
|
|
062ced1b4f | ||
|
|
c37816cdfa | ||
|
|
9fa98ae7c4 | ||
|
|
f60035837d | ||
|
|
c96547d1e4 | ||
|
|
b3265a3d45 | ||
|
|
71e9ac7753 | ||
|
|
ead4e2dcb8 | ||
|
|
4814a7cc8c | ||
|
|
c1061356e6 | ||
|
|
6a69bd9a2b | ||
|
|
fbd7b589dc | ||
|
|
1510f8e16c | ||
|
|
4028658d2d | ||
|
|
6478b567f5 | ||
|
|
4db92c1188 | ||
|
|
8b8c74476d | ||
|
|
75b921ed90 | ||
|
|
59d947b664 | ||
|
|
0e1075aa90 | ||
|
|
8a03c1f269 | ||
|
|
cfca7355f4 | ||
|
|
a4d5eb0835 | ||
|
|
6753ad4ed1 | ||
|
|
b5cab30fb5 | ||
|
|
225eb74dcc | ||
|
|
792bda3e5d | ||
|
|
08b565203c | ||
|
|
2a93fbb21a | ||
|
|
4006bb682f | ||
|
|
652f547f01 | ||
|
|
413e0d5513 | ||
|
|
0f8d7798cc | ||
|
|
5103e7ac1b | ||
|
|
63a1641d18 | ||
|
|
2ea491f1ad | ||
|
|
46c4a5f8e1 | ||
|
|
a60b72dcee | ||
|
|
66e0a9f9ab | ||
|
|
89bb662185 | ||
|
|
7afff9642a | ||
|
|
0554359353 | ||
|
|
2b5ada67a2 | ||
|
|
b35e4e0c54 | ||
|
|
3eff60e85b | ||
|
|
473daf27c6 | ||
|
|
7832687b71 | ||
|
|
9430f7cf88 | ||
|
|
a819b3de95 | ||
|
|
3d5464b54d | ||
|
|
d2a61aa711 | ||
|
|
5b5d5b1659 | ||
|
|
7ee0070701 | ||
|
|
71f22b755f | ||
|
|
1824ba27bc | ||
|
|
711bbde7d6 | ||
|
|
b992f29a9a | ||
|
|
c0f54fe29c | ||
|
|
2164e96e5f | ||
|
|
3b33a01f77 | ||
|
|
acd3c50c05 | ||
|
|
dbff5d10d5 | ||
|
|
0d8d10ac3a | ||
|
|
08a95f0783 | ||
|
|
eb2261ef91 | ||
|
|
12eadfb580 | ||
|
|
b6d95a9924 | ||
|
|
fef5deb7a0 | ||
|
|
014003e808 | ||
|
|
8ea2df76f6 |
@@ -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_catchsql_test 27.10 {
|
||||
INSERT INTO t0(c0) VALUES(0) ON CONFLICT(c0) DO UPDATE SET c0 = 3;
|
||||
} {1 {ON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint}}
|
||||
|
||||
+# 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
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
From 4c5f8ebaf38faa9be7bdacc4fe53e91dc9750a88 Mon Sep 17 00:00:00 2001
|
||||
From: wbq_sky <wangbingquan@huawei.com>
|
||||
Date: Wed, 31 Aug 2022 10:56:50 +0800
|
||||
Subject: [PATCH] Fix CVE-2021-20223 From
|
||||
d1d43efa4fb0f2098c0e2c5bf2e807c58d5ec05b Mon Sep 17 00:00:00 2001 From: dan
|
||||
<dan@noemail.net> Date: Mon, 26 Oct 2020 13:24:36 +0000 Subject: [PATCH]
|
||||
Prevent fts5 tokenizer unicode61 from considering '\0' to be a token
|
||||
characters, even if other characters of class "Cc" are.
|
||||
|
||||
FossilOrigin-Name: b7b7bde9b7a03665e3691c6d51118965f216d2dfb1617f138b9f9e60e418ed2f
|
||||
---
|
||||
ext/fts5/fts5_unicode2.c | 1 +
|
||||
ext/fts5/test/fts5tok1.test | 35 +++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 36 insertions(+)
|
||||
|
||||
diff --git a/ext/fts5/fts5_unicode2.c b/ext/fts5/fts5_unicode2.c
|
||||
index 161e8d8..843133e 100644
|
||||
--- a/ext/fts5/fts5_unicode2.c
|
||||
+++ b/ext/fts5/fts5_unicode2.c
|
||||
@@ -773,4 +773,5 @@ void sqlite3Fts5UnicodeAscii(u8 *aArray, u8 *aAscii){
|
||||
}
|
||||
iTbl++;
|
||||
}
|
||||
+ aAscii[0] = 0; /* 0x00 is never a token character */
|
||||
}
|
||||
diff --git a/ext/fts5/test/fts5tok1.test b/ext/fts5/test/fts5tok1.test
|
||||
index a336f11..c605ce3 100644
|
||||
--- a/ext/fts5/test/fts5tok1.test
|
||||
+++ b/ext/fts5/test/fts5tok1.test
|
||||
@@ -111,5 +111,40 @@ do_catchsql_test 2.1 {
|
||||
SELECT * FROM t4;
|
||||
} {1 {SQL logic error}}
|
||||
|
||||
+#-------------------------------------------------------------------------
|
||||
+# Embedded 0x00 characters.
|
||||
+#
|
||||
+reset_db
|
||||
+do_execsql_test 3.1.0 {
|
||||
+ CREATE VIRTUAL TABLE t1 USING fts5(z);
|
||||
+ CREATE VIRTUAL TABLE tt USING fts5vocab(t1, 'instance');
|
||||
+ INSERT INTO t1 VALUES('abc' || char(0) || 'def');
|
||||
+ SELECT * FROM tt;
|
||||
+} { abc 1 z 0 def 1 z 1 }
|
||||
+do_execsql_test 3.1.1 {
|
||||
+ SELECT hex(z) FROM t1;
|
||||
+} {61626300646566}
|
||||
+do_execsql_test 3.1.2 {
|
||||
+ INSERT INTO t1(t1) VALUES('integrity-check');
|
||||
+} {}
|
||||
+
|
||||
+do_execsql_test 3.2.0 {
|
||||
+ CREATE VIRTUAL TABLE t2 USING fts5(z,
|
||||
+ tokenize="unicode61 categories 'L* N* Co Cc'"
|
||||
+ );
|
||||
+ CREATE VIRTUAL TABLE tu USING fts5vocab(t2, 'instance');
|
||||
+
|
||||
+ INSERT INTO t2 VALUES('abc' || char(0) || 'def');
|
||||
+ SELECT * FROM tu;
|
||||
+} { abc 1 z 0 def 1 z 1 }
|
||||
+
|
||||
+do_execsql_test 3.2.1 {
|
||||
+ SELECT hex(z) FROM t1;
|
||||
+} {61626300646566}
|
||||
+
|
||||
+do_execsql_test 3.2.2 {
|
||||
+ INSERT INTO t1(t1) VALUES('integrity-check');
|
||||
+} {}
|
||||
+
|
||||
|
||||
finish_test
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
From d409970d551d4cc9c8fc969cb3f39b0a2334841f Mon Sep 17 00:00:00 2001
|
||||
From: zwtmichael <zhuwentao5@huawei.com>
|
||||
Date: Tue, 6 Sep 2022 10:47:19 +0800
|
||||
Subject: [PATCH] fix integer overflow on gigabyte string
|
||||
|
||||
Signed-off-by: zwtmichael <zhuwentao5@huawei.com>
|
||||
---
|
||||
src/printf.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/printf.c b/src/printf.c
|
||||
index ae95702..699bdb5 100644
|
||||
--- a/src/printf.c
|
||||
+++ b/src/printf.c
|
||||
@@ -798,8 +798,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
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
Index: sqlite-src-3320300/src/select.c
|
||||
==================================================================
|
||||
--- sqlite-src-3320300/src/select.c
|
||||
+++ sqlite-src-3320300/src/select.c
|
||||
@@ -5613,11 +5613,13 @@
|
||||
** within the HAVING expression with a constant "1".
|
||||
*/
|
||||
static int havingToWhereExprCb(Walker *pWalker, Expr *pExpr){
|
||||
if( pExpr->op!=TK_AND ){
|
||||
Select *pS = pWalker->u.pSelect;
|
||||
- if( sqlite3ExprIsConstantOrGroupBy(pWalker->pParse, pExpr, pS->pGroupBy) ){
|
||||
+ if( sqlite3ExprIsConstantOrGroupBy(pWalker->pParse, pExpr, pS->pGroupBy)
|
||||
+ && ExprAlwaysFalse(pExpr)==0
|
||||
+ ){
|
||||
sqlite3 *db = pWalker->pParse->db;
|
||||
Expr *pNew = sqlite3Expr(db, TK_INTEGER, "1");
|
||||
if( pNew ){
|
||||
Expr *pWhere = pS->pWhere;
|
||||
SWAP(Expr, *pNew, *pExpr);
|
||||
|
||||
Index: sqlite-src-3320300/test/having.test
|
||||
==================================================================
|
||||
--- sqlite-src-3320300/test/having.test
|
||||
+++ sqlite-src-3320300/test/having.test
|
||||
@@ -63,12 +63,12 @@
|
||||
"SELECT a, sum(b) FROM t1 WHERE a=2 GROUP BY a HAVING sum(b)>5"
|
||||
|
||||
3 "SELECT a, sum(b) FROM t1 GROUP BY a COLLATE binary HAVING a=2"
|
||||
"SELECT a, sum(b) FROM t1 WHERE a=2 GROUP BY a COLLATE binary"
|
||||
|
||||
- 5 "SELECT a, sum(b) FROM t1 GROUP BY a COLLATE binary HAVING 0"
|
||||
- "SELECT a, sum(b) FROM t1 WHERE 0 GROUP BY a COLLATE binary"
|
||||
+ 5 "SELECT a, sum(b) FROM t1 GROUP BY a COLLATE binary HAVING 1"
|
||||
+ "SELECT a, sum(b) FROM t1 WHERE 1 GROUP BY a COLLATE binary"
|
||||
|
||||
6 "SELECT count(*) FROM t1,t2 WHERE a=c GROUP BY b, d HAVING b=d"
|
||||
"SELECT count(*) FROM t1,t2 WHERE a=c AND b=d GROUP BY b, d"
|
||||
|
||||
7 {
|
||||
@@ -151,8 +151,28 @@
|
||||
#
|
||||
set ::nondeter_ret 0
|
||||
do_execsql_test 4.3 {
|
||||
SELECT a, sum(b) FROM t3 WHERE nondeter(a) GROUP BY a
|
||||
} {1 4 2 2}
|
||||
+
|
||||
+#-------------------------------------------------------------------------
|
||||
+reset_db
|
||||
+do_execsql_test 5.0 {
|
||||
+ CREATE TABLE t1(a, b);
|
||||
+ CREATE TABLE t2(x, y);
|
||||
+ INSERT INTO t1 VALUES('a', 'b');
|
||||
+}
|
||||
+
|
||||
+# The WHERE clause (a=2), uses an aggregate column from the outer query.
|
||||
+# If the HAVING term (0) is moved into the WHERE clause in this case,
|
||||
+# SQLite would at one point optimize (a=2 AND 0) to simply (0). Which
|
||||
+# is logically correct, but happened to cause problems in aggregate
|
||||
+# processing for the outer query. This test case verifies that those
|
||||
+# problems are no longer present.
|
||||
+do_execsql_test 5.1 {
|
||||
+ SELECT min(b), (
|
||||
+ SELECT x FROM t2 WHERE a=2 GROUP BY y HAVING 0
|
||||
+ ) FROM t1;
|
||||
+} {b {}}
|
||||
|
||||
|
||||
finish_test
|
||||
|
||||
+33
-16
@@ -1,19 +1,21 @@
|
||||
diff -up sqlite-src-3120200/configure.ac.malloc_usable_size sqlite-src-3120200/configure.ac
|
||||
--- sqlite-src-3120200/configure.ac.malloc_usable_size 2016-04-25 09:46:48.134690570 +0200
|
||||
+++ sqlite-src-3120200/configure.ac 2016-04-25 09:48:41.622637181 +0200
|
||||
@@ -108,7 +108,7 @@ AC_CHECK_HEADERS([sys/types.h stdlib.h s
|
||||
#########
|
||||
# Figure out whether or not we have these functions
|
||||
#
|
||||
-AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64])
|
||||
+AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s strchrnul usleep utime pread pread64 pwrite pwrite64])
|
||||
|
||||
#########
|
||||
# By default, we use the amalgamation (this may be changed below...)
|
||||
diff -up sqlite-src-3120200/configure.malloc_usable_size sqlite-src-3120200/configure
|
||||
--- sqlite-src-3120200/configure.malloc_usable_size 2016-04-25 09:47:12.594679063 +0200
|
||||
+++ sqlite-src-3120200/configure 2016-04-25 09:49:28.684615042 +0200
|
||||
@@ -10275,7 +10275,7 @@ done
|
||||
From 6a7c9be9502ea2023c4b5cf39a0d5a5a55b320f7 Mon Sep 17 00:00:00 2001
|
||||
From: Lixiaokeng <lixiaokeng@huawei.com>
|
||||
Date: Wed, 17 Jul 2024 10:31:56 +0800
|
||||
Subject: [PATCH] sqlite no malloc_usable_size
|
||||
|
||||
Reference:https://gitee.com/src-openeuler/sqlite/blob/openEuler-22.03-LTS-SP3/0001-sqlite-no-malloc-usable-size.patch
|
||||
Conflict:NA
|
||||
|
||||
---
|
||||
configure | 2 +-
|
||||
configure.ac | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 29ca76b..d67183a 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -10292,7 +10292,7 @@ done
|
||||
#########
|
||||
# Figure out whether or not we have these functions
|
||||
#
|
||||
@@ -22,3 +24,18 @@ diff -up sqlite-src-3120200/configure.malloc_usable_size sqlite-src-3120200/conf
|
||||
do :
|
||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 53be0a6..6f9b1e1 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -108,7 +108,7 @@ AC_CHECK_HEADERS([sys/types.h stdlib.h stdint.h inttypes.h malloc.h])
|
||||
#########
|
||||
# Figure out whether or not we have these functions
|
||||
#
|
||||
-AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64])
|
||||
+AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s strchrnul usleep utime pread pread64 pwrite pwrite64])
|
||||
|
||||
#########
|
||||
# By default, we use the amalgamation (this may be changed below...)
|
||||
--
|
||||
2.33.0
|
||||
+3
-1
@@ -3,6 +3,9 @@ From: eulerstorage <eulerstoragemt@huawei.com>
|
||||
Date: Sat, 11 Jan 2020 11:33:54 +0800
|
||||
Subject: [PATCH] remove fail testcase in no free fd situation
|
||||
|
||||
Reference:https://gitee.com/src-openeuler/sqlite/blob/openEuler-22.03-LTS-SP3/0002-remove-fail-testcase-in-no-free-fd-situation.patch
|
||||
Conflict:NA
|
||||
|
||||
Remove testcase 1.1.1, 1.1.2 and 1.1.3, since it can not success in
|
||||
some situation if there is no enough fd resource.
|
||||
---
|
||||
@@ -63,4 +66,3 @@ index a51301c..d46218f 100644
|
||||
do_test 1.2.1 {
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From 26ea25aacc1e70f4d142d8f041da2065509c0b51 Mon Sep 17 00:00:00 2001
|
||||
From: zwtmichael <zhuwentao5@huawei.com>
|
||||
Date: Tue, 30 Aug 2022 17:02:04 +0800
|
||||
Subject: [PATCH] fix memory problem in the rtree test suite
|
||||
|
||||
Reference:https://gitee.com/src-openeuler/sqlite/blob/openEuler-22.03-LTS-SP3/0004-fix-memory-problem-in-the-rtree-test-suite.patch
|
||||
Conflict: BoxQueryCtx change to BoxGeomCtx
|
||||
---
|
||||
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 cdbcb2e..59a7942 100644
|
||||
--- a/ext/rtree/test_rtreedoc.c
|
||||
+++ b/ext/rtree/test_rtreedoc.c
|
||||
@@ -188,7 +188,7 @@ static int SQLITE_TCLAPI register_box_geom(
|
||||
}
|
||||
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
|
||||
|
||||
- pCtx = (BoxGeomCtx*)ckalloc(sizeof(BoxGeomCtx*));
|
||||
+ pCtx = (BoxGeomCtx*)ckalloc(sizeof(BoxGeomCtx));
|
||||
pCtx->interp = interp;
|
||||
pCtx->pScript = Tcl_DuplicateObj(objv[2]);
|
||||
Tcl_IncrRefCount(pCtx->pScript);
|
||||
--
|
||||
2.33.0
|
||||
@@ -0,0 +1,34 @@
|
||||
From c5c8e025ff6cf0f7400b17aec73014e9cdc00935 Mon Sep 17 00:00:00 2001
|
||||
From: zwtmichael <zhuwentao5@huawei.com>
|
||||
Date: Mon, 7 Aug 2023 15:10:32 +0800
|
||||
Subject: [PATCH] fix segmentation violation
|
||||
|
||||
Reference:https://gitee.com/src-openeuler/sqlite/blob/openEuler-22.03-LTS-SP3/0007-CVE-2023-36191.patch
|
||||
Conflict:context adaptation
|
||||
|
||||
Signed-off-by: zwtmichael <zhuwentao5@huawei.com>
|
||||
---
|
||||
src/shell.c.in | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/shell.c.in b/src/shell.c.in
|
||||
index 72e4498..355b4bb 100644
|
||||
--- a/src/shell.c.in
|
||||
+++ b/src/shell.c.in
|
||||
@@ -12219,8 +12219,12 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){
|
||||
}else if( cli_strcmp(z,"-bail")==0 ){
|
||||
bail_on_error = 1;
|
||||
}else if( cli_strcmp(z,"-nonce")==0 ){
|
||||
- free(data.zNonce);
|
||||
- data.zNonce = strdup(argv[++i]);
|
||||
+ if( data.zNonce ) free(data.zNonce);
|
||||
+ if( i + 1 < argc ) data.zNonce = strdup(argv[++i]);
|
||||
+ else{
|
||||
+ data.zNonce = 0;
|
||||
+ break;
|
||||
+ }
|
||||
}else if( cli_strcmp(z,"-unsafe-testing")==0 ){
|
||||
ShellSetFlag(&data,SHFLG_TestingMode);
|
||||
}else if( cli_strcmp(z,"-safe")==0 ){
|
||||
--
|
||||
2.33.0
|
||||
@@ -1,10 +1,12 @@
|
||||
it From a756d158b3e55831975feb45b753ba499d2adeda Mon Sep 17 00:00:00 2001
|
||||
From: mazhao <mazhao12@huawei.com>
|
||||
Date: Wed, 3 Jan 2024 12:00:45 +0800
|
||||
From 310e27eec4eb0e6c5cbc7bad6d3c0ad71619cb44 Mon Sep 17 00:00:00 2001
|
||||
From: dan <Dan Kennedy>
|
||||
Date: Thu, 7 Sep 2023 13:53:09 +0000
|
||||
Subject: [PATCH] Fix a buffer overread in the sessions extension that could
|
||||
occur when processing a corrupt changeset.
|
||||
|
||||
Signed-off-by: mazhao <mazhao12@huawei.com>
|
||||
Reference:https://sqlite.org/src/info/0e4e7a05c4204b47
|
||||
Conflict:NA
|
||||
|
||||
---
|
||||
ext/session/sqlite3session.c | 18 +++++++++++-------
|
||||
1 file changed, 11 insertions(+), 7 deletions(-)
|
||||
@@ -41,5 +43,4 @@ index a892804..72ad427 100644
|
||||
}
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
||||
2.33.0
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+93
-70
@@ -1,33 +1,29 @@
|
||||
%bcond_without check
|
||||
|
||||
%global extver 3320300
|
||||
%global extver 3420000
|
||||
%global tcl_version 8.6
|
||||
%global tcl_sitearch %{_libdir}/tcl%{tcl_version}
|
||||
%global year 2020
|
||||
|
||||
Name: sqlite
|
||||
Version: 3.32.3
|
||||
Release: 7
|
||||
Version: 3.42.0
|
||||
Release: 3
|
||||
Summary: Embeded SQL database
|
||||
License: Public Domain
|
||||
URL: http://www.sqlite.org/
|
||||
|
||||
Source0: https://www.sqlite.org/%{year}/sqlite-src-%{extver}.zip
|
||||
Source1: http://www.sqlite.org/%{year}/sqlite-doc-%{extver}.zip
|
||||
Source2: https://www.sqlite.org/%{year}/sqlite-autoconf-%{extver}.tar.gz
|
||||
Source0: https://www.sqlite.org/2023/sqlite-src-%{extver}.zip
|
||||
Source1: http://www.sqlite.org/2023/sqlite-doc-%{extver}.zip
|
||||
Source2: https://www.sqlite.org/2023/sqlite-autoconf-%{extver}.tar.gz
|
||||
|
||||
Patch1: 0001-sqlite-no-malloc-usable-size.patch
|
||||
Patch2: 0002-remove-fail-testcase-in-no-free-fd-situation.patch
|
||||
Patch3: CVE-2021-20227.patch
|
||||
Patch4: 0004-CVE-2022-35737.patch
|
||||
Patch5: 0005-CVE-2021-20223.patch
|
||||
Patch6: 0006-fix-integer-overflow-on-gigabyte-string.patch
|
||||
Patch7: 0007-CVE-2023-7104.patch
|
||||
Patch6000: backport-0001-sqlite-no-malloc-usable-size.patch
|
||||
Patch6001: backport-0002-remove-fail-testcase-in-no-free-fd-situation.patch
|
||||
Patch6002: backport-0003-fix-memory-problem-in-the-rtree-test-suite.patch
|
||||
Patch6003: backport-0004-CVE-2023-36191.patch
|
||||
Patch6004: backport-CVE-2023-7104.patch
|
||||
|
||||
BuildRequires: gcc autoconf tcl tcl-devel
|
||||
BuildRequires: ncurses-devel readline-devel glibc-devel
|
||||
|
||||
|
||||
Provides: %{name}-libs
|
||||
Obsoletes: %{name}-libs
|
||||
Provides: lemon
|
||||
@@ -65,19 +61,17 @@ This contains man files and HTML files for the using of sqlite.
|
||||
%prep
|
||||
#autosetup will fail because of 2 zip files
|
||||
%setup -q -a1 -n %{name}-src-%{extver}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch6000 -p1
|
||||
%patch6001 -p1
|
||||
%patch6002 -p1
|
||||
%patch6003 -p1
|
||||
%patch6004 -p1
|
||||
|
||||
rm -f %{name}-doc-%{extver}/sqlite.css~ || :
|
||||
|
||||
autoconf
|
||||
|
||||
%build
|
||||
|
||||
autoconf
|
||||
export CFLAGS="$RPM_OPT_FLAGS $RPM_LD_FLAGS -DSQLITE_ENABLE_COLUMN_METADATA=1 \
|
||||
-DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 \
|
||||
-DSQLITE_ENABLE_RTREE=1 -DSQLITE_SECURE_DELETE=1 \
|
||||
@@ -113,13 +107,15 @@ chmod 755 %{buildroot}/%{tcl_sitearch}/sqlite3/*.so
|
||||
%check
|
||||
export LD_LIBRARY_PATH=`pwd`/.libs
|
||||
export MALLOC_CHECK_=3
|
||||
#bypass zipfile.test
|
||||
rm test/zipfile.test
|
||||
|
||||
%ifarch x86_64 %{ix86}
|
||||
%else
|
||||
rm test/csv01.test
|
||||
%endif
|
||||
%ifarch loongarch64
|
||||
rm -rf test/thread1.test
|
||||
rm -rf test/thread2.test
|
||||
%endif
|
||||
|
||||
make test
|
||||
%endif # with check
|
||||
@@ -144,70 +140,97 @@ make test
|
||||
%{_mandir}/man*/*
|
||||
|
||||
%changelog
|
||||
* Wed Jan 3 2024 mazhao <mazhao12@huawei.com> - 3.32.3-7
|
||||
* Mon Nov 11 2024 wangmian <wangmian19@h-partners.com> - 3.42.0-3
|
||||
- sync the patch from 2203
|
||||
|
||||
* Wed Sep 4 2024 wangmian <wangmian19@h-partners.com> - 3.42.0-2
|
||||
- sync the CVE-2023-7104 from 2203
|
||||
|
||||
* Tue Feb 27 2024 Zheng Zhenyu <zheng.zhenyu@outlook.com> - 3.42.0-1
|
||||
- Bump version to fix CVE-2024-0232
|
||||
|
||||
* Wed Jan 3 2024 mazhao <mazhao12@huawei.com> - 3.37.2-7
|
||||
- fix the CVE-2023-7104
|
||||
|
||||
* Tue Sep 6 2022 zhuwentao <zhuwentao5@huawei.com> - 3.32.3-6
|
||||
* Mon Aug 7 2023 zhuwentao <zhuwentao5@huawei.com> - 3.37.2-6
|
||||
- fix the CVE-2023-36191
|
||||
|
||||
* Fri Jan 13 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 3.37.2-5
|
||||
- remove fail testcase for loongarch
|
||||
|
||||
* Wed Dec 14 2022 zhuwentao <zhuwentao5@huawei.com> - 3.37.2-4
|
||||
- fix the CVE-2022-46908
|
||||
|
||||
* Wed Sep 14 2022 zhuwentao <zhuwentao5@huawei.com> - 3.37.2-3
|
||||
- fix build problem
|
||||
|
||||
* Mon Sep 5 2022 zhuwentao <zhuwentao5@huawei.com> - 3.37.2-2
|
||||
- fix integer overflow on gigabyte string
|
||||
|
||||
* Wed Aug 31 2022 wbq_sky<wangbingquan@huawei.com> - 3.32.3-5
|
||||
- Fix CVE-2021-20223
|
||||
* Mon Aug 29 2022 zhuwentao <zhuwentao5@huawei.com> - 3.37.2-1
|
||||
- update to 3.37.2
|
||||
|
||||
* Tue Aug 16 2022 liusirui<liusirui@huawei.com> - 3.32.3-4
|
||||
- Fix CVE-2022-35737
|
||||
* Tue Aug 16 2022 liusirui <liusirui@huawei.com> - 3.36.0-3
|
||||
- fix the CVE-2022-35737.
|
||||
|
||||
* Mon Apr 26 2021 bzhaoop<bzhaojyathousandy@gmail.com> - 3.32.3-3
|
||||
- Fix CVE-2021-20227
|
||||
* Sat Nov 27 2021 wbq_sky <wangbingquan@huawei.com> - 3.36.0-2
|
||||
- fix the CVE-2021-36690.
|
||||
|
||||
* Thu Sep 3 2020 lihaotian<lihaotian9@huawei.com> - 3.32.3-2
|
||||
* Fri Nov 25 2021 wbq_sky <wangbingquan@huawei.com> - 3.36.0-1
|
||||
- update to 3.36.0.
|
||||
|
||||
* Fri Sep 26 2021 wbq_sky <wangbingquan@huawei.com> - 3.34.0-4
|
||||
- fix the uninitialized value used in pattern match.
|
||||
|
||||
* Fri Sep 3 2021 wbq_sky <wangbingquan@huawei.com> - 3.34.0-3
|
||||
- fix the null reference in the tigger statement.
|
||||
|
||||
* Fri Sep 3 2021 wbq_sky <wangbingquan@huawei.com> - 3.34.0-2
|
||||
- fix the infinite loop problem in the trim function while the pattern is well formed.
|
||||
|
||||
* Thu Jan 14 2021 yanglongkang <yanglongkang@huawei.com> - 3.34.0-1
|
||||
- update package to 3.34.0
|
||||
|
||||
* Thu Sep 3 2020 lihaotian<lihaotian9@huawei.com> - 3.32.3-3
|
||||
- update source0 url
|
||||
|
||||
* Tue Aug 25 2020 yanglongkang <yanglongkang@huawei.com> - 3.32.3-1
|
||||
* Tue Jul 21 2020 jixinjie <jixinjie@huawei.com> - 3.32.3-2
|
||||
- update yaml file
|
||||
|
||||
* Tue Jul 21 2020 jixinjie <jixinjie@huawei.com> - 3.32.3-1
|
||||
- update package to 3.32.3
|
||||
|
||||
* Tue Aug 4 2020 yanglongkang <yanglongkang@huawei.com> - 3.31.1-2
|
||||
- Type:cves
|
||||
- ID:CVE-2020-13871
|
||||
- SUG: NA
|
||||
- DESC: fix cve
|
||||
|
||||
* Mon Aug 3 2020 yanglongkang <yanglongkang@huawei.com> - 3.31.1-1
|
||||
- Type:cves
|
||||
- ID:CVE-2020-15358 CVE-2020-13631
|
||||
- SUG: NA
|
||||
- DESC: fix cve
|
||||
|
||||
* Fri Apr 17 2020 luoshijie <luoshijie1@huawei.com> - 3.31.1-0
|
||||
* Tue Jun 30 2020 volcanodragon <linfeilong@huawei.com> - 3.24.0-12
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:restart
|
||||
- DESC:update sqlite to 3.31.1.
|
||||
|
||||
* Tue Mar 10 2020 guiyao <guiyao@huawei.com> - 3.24.0-11
|
||||
- Type:cves
|
||||
- ID:CVE-2020-9327
|
||||
- SUG: NA
|
||||
- DESC: fix cve
|
||||
|
||||
* Fri Feb 28 2020 sunshihao <sunshihao@huawei.com> - 3.24.0-10
|
||||
- Type:enhancement
|
||||
- ID:
|
||||
- SUG: NA
|
||||
- DESC: remove suffix information
|
||||
|
||||
* Wed Feb 26 2020 guiyao <guiyao@huawei.com> - 3.24.0-9
|
||||
- Type:cves
|
||||
- ID:CVE-2018-20505
|
||||
- SUG:NA
|
||||
- DESC:fix cves
|
||||
- DESC:rename patches
|
||||
|
||||
* Sat Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.24.0-8
|
||||
* Tue Jun 23 2020 yanglongkang <yanglongkang@huawei.com> - 3.24.0-11
|
||||
- Type:cves
|
||||
- ID:CVE-2020-13434 CVE-2020-13435 CVE-2020-13630 CVE-2020-13632
|
||||
- SUG:NA
|
||||
- DESC:fix CVE-2020-13434 CVE-2020-13435 CVE-2020-13630 CVE-2020-13632
|
||||
|
||||
* Sun Apr 19 2020 ethan848 <mingfangsen@huawei.com>
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:CVE-2020-11655 fixed
|
||||
|
||||
* Tue Mar 10 2020 steven <steven_ygui@163.com> - 3.24.0-9
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:CVE-2018-20505, CVE-2020-9327 fixed
|
||||
|
||||
* Wed Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.24.0-8
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:CVE-2019-19959 fixed
|
||||
|
||||
* Sat Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.24.0-7
|
||||
* Wed Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.24.0-7
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
version_control: fossil
|
||||
src_repo: https://www.sqlite.org/src
|
||||
tag_prefix: "version-"
|
||||
seperator: "."
|
||||
Reference in New Issue
Block a user