update to 3.37.2
Signed-off-by: zwtmichael <zhuwentao5@huawei.com>
This commit is contained in:
parent
538587881d
commit
d8002ef402
@ -1,44 +0,0 @@
|
||||
diff -rNu a/ext/expert/sqlite3expert.c b/ext/expert/sqlite3expert.c
|
||||
--- a/ext/expert/sqlite3expert.c 2021-11-25 09:00:19.267831518 +0800
|
||||
+++ b/ext/expert/sqlite3expert.c 2021-11-25 09:07:38.551969861 +0800
|
||||
@@ -690,11 +690,13 @@
|
||||
rc = idxPrintfPrepareStmt(db, &p1, pzErrmsg, "PRAGMA table_xinfo=%Q", zTab);
|
||||
while( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(p1) ){
|
||||
const char *zCol = (const char*)sqlite3_column_text(p1, 1);
|
||||
+ const char *zColSeq = 0;
|
||||
nByte += 1 + STRLEN(zCol);
|
||||
rc = sqlite3_table_column_metadata(
|
||||
- db, "main", zTab, zCol, 0, &zCol, 0, 0, 0
|
||||
+ db, "main", zTab, zCol, 0, &zColSeq, 0, 0, 0
|
||||
);
|
||||
- nByte += 1 + STRLEN(zCol);
|
||||
+ if( zColSeq==0 ) zColSeq = "binary";
|
||||
+ nByte += 1 + STRLEN(zColSeq);
|
||||
nCol++;
|
||||
nPk += (sqlite3_column_int(p1, 5)>0);
|
||||
}
|
||||
@@ -714,6 +716,7 @@
|
||||
nCol = 0;
|
||||
while( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(p1) ){
|
||||
const char *zCol = (const char*)sqlite3_column_text(p1, 1);
|
||||
+ const char *zColSeq = 0;
|
||||
int nCopy = STRLEN(zCol) + 1;
|
||||
pNew->aCol[nCol].zName = pCsr;
|
||||
pNew->aCol[nCol].iPk = (sqlite3_column_int(p1, 5)==1 && nPk==1);
|
||||
@@ -721,12 +724,13 @@
|
||||
pCsr += nCopy;
|
||||
|
||||
rc = sqlite3_table_column_metadata(
|
||||
- db, "main", zTab, zCol, 0, &zCol, 0, 0, 0
|
||||
+ db, "main", zTab, zCol, 0, &zColSeq, 0, 0, 0
|
||||
);
|
||||
if( rc==SQLITE_OK ){
|
||||
- nCopy = STRLEN(zCol) + 1;
|
||||
+ if( zColSeq==0 ) zColSeq = "binary";
|
||||
+ nCopy = STRLEN(zColSeq) + 1;
|
||||
pNew->aCol[nCol].zColl = pCsr;
|
||||
- memcpy(pCsr, zCol, nCopy);
|
||||
+ memcpy(pCsr, zColSeq, nCopy);
|
||||
pCsr += nCopy;
|
||||
}
|
||||
|
||||
25
0004-fix-memory-problem-in-the-rtree-test-suite.patch
Normal file
25
0004-fix-memory-problem-in-the-rtree-test-suite.patch
Normal file
@ -0,0 +1,25 @@
|
||||
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
|
||||
|
||||
Binary file not shown.
BIN
sqlite-autoconf-3370200.tar.gz
Normal file
BIN
sqlite-autoconf-3370200.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
19
sqlite.spec
19
sqlite.spec
@ -1,24 +1,24 @@
|
||||
%bcond_without check
|
||||
|
||||
%global extver 3360000
|
||||
%global extver 3370200
|
||||
%global tcl_version 8.6
|
||||
%global tcl_sitearch %{_libdir}/tcl%{tcl_version}
|
||||
|
||||
Name: sqlite
|
||||
Version: 3.36.0
|
||||
Release: 3
|
||||
Version: 3.37.2
|
||||
Release: 1
|
||||
Summary: Embeded SQL database
|
||||
License: Public Domain
|
||||
URL: http://www.sqlite.org/
|
||||
|
||||
Source0: https://www.sqlite.org/2021/sqlite-src-%{extver}.zip
|
||||
Source1: http://www.sqlite.org/2021/sqlite-doc-%{extver}.zip
|
||||
Source2: https://www.sqlite.org/2021/sqlite-autoconf-%{extver}.tar.gz
|
||||
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
|
||||
|
||||
Patch1: 0001-sqlite-no-malloc-usable-size.patch
|
||||
Patch2: 0002-remove-fail-testcase-in-no-free-fd-situation.patch
|
||||
Patch3: 0003-CVE-2021-36690.patch
|
||||
Patch4: 0004-CVE-2022-35737.patch
|
||||
Patch3: 0003-CVE-2022-35737.patch
|
||||
Patch4: 0004-fix-memory-problem-in-the-rtree-test-suite.patch
|
||||
|
||||
BuildRequires: gcc autoconf tcl tcl-devel
|
||||
BuildRequires: ncurses-devel readline-devel glibc-devel
|
||||
@ -135,6 +135,9 @@ make test
|
||||
%{_mandir}/man*/*
|
||||
|
||||
%changelog
|
||||
* 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.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user