Apply CVE-2021-20227 patch 67/277767/1 accepted/tizen_6.5_base accepted/tizen_6.5_base_tool sandbox/backup/sqlite_3.33.0_20220707_tizen_6.5_base tizen_6.5_base accepted/tizen/6.5/base/20230714.002721 accepted/tizen/6.5/base/tool/20220718.041309 submit/tizen_6.5_base/20220713.073119 submit/tizen_6.5_base/20220715.045115
authorJinWang An <jinwang.an@samsung.com>
Wed, 13 Jul 2022 04:49:49 +0000 (13:49 +0900)
committerJinWang An <jinwang.an@samsung.com>
Wed, 13 Jul 2022 04:49:49 +0000 (13:49 +0900)
Change-Id: I4e5df74f99947f2747786d7331a90c8b4b70abb2
Signed-off-by: JinWang An <jinwang.an@samsung.com>
packaging/CVE-2021-20227.patch [new file with mode: 0644]

diff --git a/packaging/CVE-2021-20227.patch b/packaging/CVE-2021-20227.patch
new file mode 100644 (file)
index 0000000..5a011fa
--- /dev/null
@@ -0,0 +1,15 @@
+diff --git a/sqlite3.c b/sqlite3.c
+index a827449..32bd44c 100644
+--- a/sqlite3.c
++++ b/sqlite3.c
+@@ -134884,7 +134884,9 @@ static void explainSimpleCount(
+ 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 ){