Blame SOURCES/sqlite-3.26.0-CVE-2020-6405.patch

cea1fa
From 1668926bc3c7da0b2870a60382b179a0e3edb5de Mon Sep 17 00:00:00 2001
cea1fa
From: Ondrej Dubaj <odubaj@redhat.com>
cea1fa
Date: Thu, 26 Mar 2020 08:14:29 +0100
cea1fa
Subject: [PATCH] Do not allow the constant-propagation optimization to apple
cea1fa
 to ON/USING clause terms as it does not help and it might cause downstream
cea1fa
 problems.
cea1fa
cea1fa
---
cea1fa
 src/select.c | 2 +-
cea1fa
 1 file changed, 1 insertion(+), 1 deletion(-)
cea1fa
cea1fa
diff --git a/src/select.c b/src/select.c
cea1fa
index bbd13a4..88a43df 100644
cea1fa
--- a/src/select.c
cea1fa
+++ b/src/select.c
cea1fa
@@ -4171,7 +4171,7 @@ static int propagateConstantExprRewrite(Walker *pWalker, Expr *pExpr){
cea1fa
   int i;
cea1fa
   WhereConst *pConst;
cea1fa
   if( pExpr->op!=TK_COLUMN ) return WRC_Continue;
cea1fa
-  if( ExprHasProperty(pExpr, EP_FixedCol) ) return WRC_Continue;
cea1fa
+  if( ExprHasProperty(pExpr, EP_FixedCol|EP_FromJoin) ) return WRC_Continue;
cea1fa
   pConst = pWalker->u.pConst;
cea1fa
   for(i=0; i<pConst->nConst; i++){
cea1fa
     Expr *pColumn = pConst->apExpr[i*2];
cea1fa
-- 
cea1fa
2.24.1
cea1fa