From 441ea6be15f68f46ecee2365a7e7ee7dd6f11ff3 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 20 Apr 2020 10:43:29 +0200 Subject: sqlite: Fix CVE-2020-11655 This was taken from 4a302b42c7bf5e11 in SQLite, ref: https://www3.sqlite.org/cgi/src/info/4a302b42c7bf5e11 [ChangeLog][QtSQL][sqlite] Fixed CVE-2020-11655 Task-number: QTBUG-83652 Change-Id: I5ead78d9ee63aa0f12f1c1014c79373728569f30 Reviewed-by: Volker Hilsheimer --- .../patches/0002-sqlite-Fix-CVE-2020-11655.patch | 30 ++++++++++++++++++++++ src/3rdparty/sqlite/sqlite3.c | 1 + 2 files changed, 31 insertions(+) create mode 100644 src/3rdparty/sqlite/patches/0002-sqlite-Fix-CVE-2020-11655.patch diff --git a/src/3rdparty/sqlite/patches/0002-sqlite-Fix-CVE-2020-11655.patch b/src/3rdparty/sqlite/patches/0002-sqlite-Fix-CVE-2020-11655.patch new file mode 100644 index 0000000000..c47e68c4a9 --- /dev/null +++ b/src/3rdparty/sqlite/patches/0002-sqlite-Fix-CVE-2020-11655.patch @@ -0,0 +1,30 @@ +From fa3ea2350c0367aa7cfd796b31214e2dcf574360 Mon Sep 17 00:00:00 2001 +From: Andy Shaw +Date: Mon, 20 Apr 2020 10:43:29 +0200 +Subject: [PATCH] sqlite: Fix CVE-2020-11655 + +This was taken from 4a302b42c7bf5e11 in SQLite, ref: +https://www3.sqlite.org/cgi/src/info/4a302b42c7bf5e11 + +[ChangeLog][QtSQL][sqlite] Fixed CVE-2020-11655 + +Change-Id: I5ead78d9ee63aa0f12f1c1014c79373728569f30 +--- + src/3rdparty/sqlite/sqlite3.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c +index dfe5323a59..054be43d95 100644 +--- a/src/3rdparty/sqlite/sqlite3.c ++++ b/src/3rdparty/sqlite/sqlite3.c +@@ -133226,6 +133226,7 @@ static void resetAccumulator(Parse *pParse, AggInfo *pAggInfo){ + struct AggInfo_func *pFunc; + int nReg = pAggInfo->nFunc + pAggInfo->nColumn; + if( nReg==0 ) return; ++ if( pParse->nErr ) return; + #ifdef SQLITE_DEBUG + /* Verify that all AggInfo registers are within the range specified by + ** AggInfo.mnReg..AggInfo.mxReg */ +-- +2.24.2 (Apple Git-127) + diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c index dfe5323a59..054be43d95 100644 --- a/src/3rdparty/sqlite/sqlite3.c +++ b/src/3rdparty/sqlite/sqlite3.c @@ -133226,6 +133226,7 @@ static void resetAccumulator(Parse *pParse, AggInfo *pAggInfo){ struct AggInfo_func *pFunc; int nReg = pAggInfo->nFunc + pAggInfo->nColumn; if( nReg==0 ) return; + if( pParse->nErr ) return; #ifdef SQLITE_DEBUG /* Verify that all AggInfo registers are within the range specified by ** AggInfo.mnReg..AggInfo.mxReg */ -- cgit v1.2.3