diff options
author | Liang Qi <liang.qi@qt.io> | 2019-09-30 12:57:57 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-09-30 14:43:02 +0200 |
commit | 99cdd5fc67386fb3361299b9ec493e081043097d (patch) | |
tree | 2c1d41d3d71f671f104e93b87bf11bdd169ba746 /src/3rdparty/sqlite/patches/0001-Fix-CVE-2019-16168-in-SQLite.patch | |
parent | 86876744f07cbaa01daca6869b896741878c39a3 (diff) | |
parent | 46201f0e82a7b1629adad196dfa8f7ff1cf4dffd (diff) |
Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
src/corelib/global/qrandom.cpp
src/corelib/io/qfileinfo.cpp
src/corelib/kernel/qeventdispatcher_win.cpp
src/corelib/kernel/qeventdispatcher_win_p.h
src/gui/text/qfontdatabase.cpp
src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
src/plugins/platforms/windows/qwindowsglcontext.cpp
src/testlib/qtestcase.cpp
Done-With: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Done-With: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I4893212471aa24be804c989a581810e2f714545c
Diffstat (limited to 'src/3rdparty/sqlite/patches/0001-Fix-CVE-2019-16168-in-SQLite.patch')
-rw-r--r-- | src/3rdparty/sqlite/patches/0001-Fix-CVE-2019-16168-in-SQLite.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/3rdparty/sqlite/patches/0001-Fix-CVE-2019-16168-in-SQLite.patch b/src/3rdparty/sqlite/patches/0001-Fix-CVE-2019-16168-in-SQLite.patch new file mode 100644 index 0000000000..e56a6a2411 --- /dev/null +++ b/src/3rdparty/sqlite/patches/0001-Fix-CVE-2019-16168-in-SQLite.patch @@ -0,0 +1,42 @@ +From 3442a3ce9c2bd366eb0bd1c18d37a6ce732a888d Mon Sep 17 00:00:00 2001 +From: Andy Shaw <andy.shaw@qt.io> +Date: Wed, 25 Sep 2019 09:17:01 +0200 +Subject: [PATCH] Fix CVE-2019-16168 in SQLite + +v3.29.0 is the latest and there is no indication as to when the next +release is so we will apply this separately for now and it can be +reverted once it is in a release that we ship with. + +This patch is taken from https://www.sqlite.org/src/info/98357d8c1263920b + +Change-Id: I82d398b093b67842a4369e3220c01e7eea30763a +--- + src/3rdparty/sqlite/sqlite3.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c +index 61bfdeb766..b3e6ae27b6 100644 +--- a/src/3rdparty/sqlite/sqlite3.c ++++ b/src/3rdparty/sqlite/sqlite3.c +@@ -105933,7 +105933,9 @@ static void decodeIntArray( + if( sqlite3_strglob("unordered*", z)==0 ){ + pIndex->bUnordered = 1; + }else if( sqlite3_strglob("sz=[0-9]*", z)==0 ){ +- pIndex->szIdxRow = sqlite3LogEst(sqlite3Atoi(z+3)); ++ int sz = sqlite3Atoi(z+3); ++ if( sz<2 ) sz = 2; ++ pIndex->szIdxRow = sqlite3LogEst(sz); + }else if( sqlite3_strglob("noskipscan*", z)==0 ){ + pIndex->noSkipScan = 1; + } +@@ -143260,6 +143262,7 @@ static int whereLoopAddBtreeIndex( + ** it to pNew->rRun, which is currently set to the cost of the index + ** seek only. Then, if this is a non-covering index, add the cost of + ** visiting the rows in the main table. */ ++ assert( pSrc->pTab->szTabRow>0 ); + rCostIdx = pNew->nOut + 1 + (15*pProbe->szIdxRow)/pSrc->pTab->szTabRow; + pNew->rRun = sqlite3LogEstAdd(rLogSize, rCostIdx); + if( (pNew->wsFlags & (WHERE_IDX_ONLY|WHERE_IPK))==0 ){ +-- +2.20.1 (Apple Git-117) + |