Compare commits

..
Author SHA1 Message Date
openeuler-ci-bot 31498bc42c !29 update source0 url in spec file
Merge pull request !29 from lihaotian/new_LTS
2020-09-03 15:48:51 +08:00
lihaotian9 d5276129ec Update the source0 url in spec file 2020-09-03 14:19:35 +08:00
openeuler-ci-bot 5df5511783 !26 update package to 3.32.3
Merge pull request !26 from Markeryang/openEuler-20.03-LTS
2020-08-25 19:16:17 +08:00
Markeryang d6b2326d7d update package to 3.32.3
update package to 3.32.3
2020-08-25 15:29:41 +08:00
zhanliwen 6339a6cc8a update to 3.32.3 2020-08-25 15:19:07 +08:00
openeuler-ci-bot 96193cf35b !24 fix CVE-2020-13871
Merge pull request !24 from Markeryang/openEuler-20.03-LTS
2020-08-04 16:00:02 +08:00
Markeryang 535b7d332e update sqlite.spec. 2020-08-04 15:14:29 +08:00
Markeryang b5718f9b04 Fix CVE-2020-13871
Fix CVE-2020-13871
2020-08-04 15:03:24 +08:00
openeuler-ci-bot c8f752305a !23 fix CVE-2020-13631 CVE-2020-15358
Merge pull request !23 from Markeryang/openEuler-20.03-LTS
2020-08-04 14:49:29 +08:00
Markeryang a97ba4bafc rename 0006-sqlite-no-malloc-usable-size.patch to 0007-sqlite-no-malloc-usable-size.patch. 2020-08-04 14:28:13 +08:00
Markeryang fdc60426fe rename 0005-Fix-CVE-2020-13631.patch to 0006-Fix-CVE-2020-13631.patch. 2020-08-04 14:27:50 +08:00
Markeryang 0bc5c71e92 rename 0004-Fix-CVE-2020-15358.patch to 0005-Fix-CVE-2020-15358.patch. 2020-08-04 14:27:27 +08:00
Markeryang a8a4f7d036 rename 0003-Fix-CVE-2020-11656.patch to 0004-Fix-CVE-2020-11656.patch. 2020-08-04 14:26:24 +08:00
Markeryang 1d44d96f90 rename 0002-Fix-CVE-2020-11655.patch to 0003-Fix-CVE-2020-11655.patch. 2020-08-04 14:25:00 +08:00
Markeryang fd617774e5 rename 0001-0002-Fix-CVE-2020-9327.patch to 0002-Fix-CVE-2020-9327.patch. 2020-08-04 14:24:33 +08:00
Markeryang 54a77ef1a9 rename 0000-0001-Fix-CVE-2020-9327.patch to 0001-Fix-CVE-2020-9327.patch. 2020-08-04 14:24:05 +08:00
Markeryang 0dd031ef19 update sqlite.spec. 2020-08-04 14:23:47 +08:00
Markeryang aaa156267f update sqlite.spec. 2020-08-04 09:49:22 +08:00
Markeryang dbf2fe2ade update sqlite.spec. 2020-08-04 09:02:40 +08:00
Markeryang 1c9ec00e1b update sqlite.spec. 2020-08-04 08:59:25 +08:00
Markeryang 84a4960c12 rename 6003-Fix-CVE-2020-11656.patch to 0003-Fix-CVE-2020-11656.patch. 2020-08-04 08:55:51 +08:00
Markeryang 2e62e8b4d4 rename 6002-Fix-CVE-2020-11655.patch to 0002-Fix-CVE-2020-11655.patch. 2020-08-04 08:55:30 +08:00
Markeryang 2573148f02 rename 6001-0002-Fix-CVE-2020-9327.patch to 0001-0002-Fix-CVE-2020-9327.patch. 2020-08-04 08:55:03 +08:00
Markeryang 47c8e1aa97 rename 0000-sqlite-no-malloc-usable-size.patch to 0006-sqlite-no-malloc-usable-size.patch. 2020-08-04 08:54:38 +08:00
Markeryang b6ff332de2 rename 6000-0001-Fix-CVE-2020-9327.patch to 0000-0001-Fix-CVE-2020-9327.patch. 2020-08-04 08:54:13 +08:00
Markeryang ae3d919fb4 update sqlite.spec. 2020-08-03 17:52:42 +08:00
Markeryang f461942ca6 update sqlite.spec. 2020-08-03 17:52:05 +08:00
Markeryang a9fb3a7181 add 0005-Fix-CVE-2020-13631.patch.
add 0005-Fix-CVE-2020-13631.patch.
2020-08-03 17:48:38 +08:00
Markeryang f279132e49 add 0004-Fix-CVE-2020-15358.patch.
0004-Fix-CVE-2020-15358.patch
2020-08-03 17:47:32 +08:00
openeuler-ci-bot 920187b9f1 !16 update sqlite to 3310100
Merge pull request !16 from lfl/master
2020-05-13 14:40:36 +08:00
wubo009 c6c12b31bc update pkg in lts branch 2020-05-12 23:06:17 +08:00
10 changed files with 42 additions and 267 deletions
-80
View File
@@ -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
@@ -1,25 +0,0 @@
From 3755f418be5c3608a7e0b59488a8e172d443d738 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
---
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
@@ -1,28 +0,0 @@
From 72210cf3c782ff30867d5c78e13900be9904ba76 Mon Sep 17 00:00:00 2001
From: zwtmichael <zhuwentao5@huawei.com>
Date: Mon, 5 Sep 2022 16:49:05 +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 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
-53
View File
@@ -1,53 +0,0 @@
From 040177c01a76ccb631bbe19a445f716f0d7b9458 Mon Sep 17 00:00:00 2001
From: zwtmichael <zhuwentao5@huawei.com>
Date: Thu, 15 Dec 2022 09:49:15 +0800
Subject: [PATCH] Fix safe mode authorizer callback to reject disallowed UDFs
Signed-off-by: zwtmichael <zhuwentao5@huawei.com>
---
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<ArraySize(azProhibitedFunctions); i++){
- if( sqlite3_stricmp(zA1, azProhibitedFunctions[i])==0 ){
+ if( sqlite3_stricmp(zA2, azProhibitedFunctions[i])==0 ){
failIfSafeMode(p, "cannot use the %s() function in safe mode",
azProhibitedFunctions[i]);
}
diff --git a/test/shell2.test b/test/shell2.test
index 6b4dff5..c3777eb 100644
--- a/test/shell2.test
+++ b/test/shell2.test
@@ -188,4 +188,15 @@ b
2
}}
+# Verify that safe mode rejects certain UDFs
+# Reported at https://sqlite.org/forum/forumpost/07beac8056151b2f
+do_test shell2-1.4.8 {
+ catchcmd "-safe :memory:" {
+ SELECT edit('DoNotCare');}
+} {1 {line 2: cannot use the edit() function in safe mode}}
+do_test shell2-1.4.9 {
+ catchcmd "-safe :memory:" {
+ SELECT writefile('DoNotCare', x'');}
+} {1 {line 2: cannot use the writefile() function in safe mode}}
+
finish_test
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+42 -77
View File
@@ -1,26 +1,23 @@
%bcond_without check
%global extver 3370200
%global extver 3320300
%global tcl_version 8.6
%global tcl_sitearch %{_libdir}/tcl%{tcl_version}
%global year 2020
Name: sqlite
Version: 3.37.2
Release: 5
Version: 3.32.3
Release: 2
Summary: Embeded SQL database
License: Public Domain
URL: http://www.sqlite.org/
Source0: https://www.sqlite.org/2022/sqlite-src-%{extver}.zip
Source1: http://www.sqlite.org/2022/sqlite-doc-%{extver}.zip
Source2: https://www.sqlite.org/2022/sqlite-autoconf-%{extver}.tar.gz
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
Patch1: 0001-sqlite-no-malloc-usable-size.patch
Patch2: 0002-remove-fail-testcase-in-no-free-fd-situation.patch
Patch3: 0003-CVE-2022-35737.patch
Patch4: 0004-fix-memory-problem-in-the-rtree-test-suite.patch
Patch5: 0005-fix-integer-overflow-on-gigabyte-string.patch
Patch6: 0006-CVE-2022-46908.patch
BuildRequires: gcc autoconf tcl tcl-devel
BuildRequires: ncurses-devel readline-devel glibc-devel
@@ -65,16 +62,13 @@ This contains man files and HTML files for the using of sqlite.
%setup -q -a1 -n %{name}-src-%{extver}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
rm -f %{name}-doc-%{extver}/sqlite.css~ || :
%build
autoconf
%build
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 \
@@ -110,15 +104,13 @@ 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
@@ -143,74 +135,47 @@ make test
%{_mandir}/man*/*
%changelog
* 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
* 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.36.0-3
- fix the CVE-2022-35737.
* Sat Nov 27 2021 wbq_sky <wangbingquan@huawei.com> - 3.36.0-2
- fix the CVE-2021-36690.
* 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
* Thu Sep 2 2020 lihaotian<lihaotian9@huawei.com> - 3.32.3-2
- update source0 url
* 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
* Tue Aug 25 2020 yanglongkang <yanglongkang@huawei.com> - 3.32.3-1
- update package to 3.32.3
* Tue Jun 30 2020 volcanodragon <linfeilong@huawei.com> - 3.24.0-12
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:rename patches
* Tue Jun 23 2020 yanglongkang <yanglongkang@huawei.com> - 3.24.0-11
* Tue Aug 4 2020 yanglongkang <yanglongkang@huawei.com> - 3.31.1-2
- 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
- ID:CVE-2020-13871
- SUG: NA
- DESC: fix cve
* Sun Apr 19 2020 ethan848 <mingfangsen@huawei.com>
* 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
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:CVE-2020-11655 fixed
- SUG:restart
- DESC:update sqlite to 3.31.1.
* Tue Mar 10 2020 steven <steven_ygui@163.com> - 3.24.0-9
* 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:NA
- 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:CVE-2018-20505, CVE-2020-9327 fixed
- DESC:fix cves
* Wed Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.24.0-8
- Type:enhancement
-4
View File
@@ -1,4 +0,0 @@
version_control: fossil
src_repo: https://www.sqlite.org/src
tag_prefix: "version-"
seperator: "."