blob: e30c482bbbb6ee49a8d8c53df7c712adf3382d49 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
From a4601326d61bf1a11151ac6b78b50804bfd03b4d Mon Sep 17 00:00:00 2001
From: Sakib Sajal <sakib.sajal@windriver.com>
Date: Thu, 30 Apr 2020 10:46:16 -0700
Subject: [PATCH 2/2] In the event of a semantic error in an aggregate query,
early-out the resetAccumulator() function to prevent problems due to
incomplete or incorrect initialization of the AggInfo object. Fix for ticket
[af4556bb5c285c08].
FossilOrigin-Name: 4a302b42c7bf5e11ddb5522ca999f74aba397d3a7eb91b1844bb02852f772441
Upstream Status: Backport [c415d91007e1680e4eb17def583b202c3c83c718]
CVE: CVE-2020-11655
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
---
sqlite3.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sqlite3.c b/sqlite3.c
index 1df6633..726adf7 100644
--- a/sqlite3.c
+++ b/sqlite3.c
@@ -133242,6 +133242,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.17.1
|