diff options
author | drh <> | 2021-02-06 14:37:36 +0000 |
---|---|---|
committer | drh <> | 2021-02-06 14:37:36 +0000 |
commit | 8873aea390d47e070171bf7cc081d406d396bdea (patch) | |
tree | c85e7874447d97e7b649378cc3113f7cc70f1348 /src/resolve.c | |
parent | 29f6a365ccd09fdf922125f324d13d2cac34d3e4 (diff) | |
download | sqlite-8873aea390d47e070171bf7cc081d406d396bdea.tar.gz sqlite-8873aea390d47e070171bf7cc081d406d396bdea.zip |
Fix the OSSFuzz-discovered shift problem from two days ago. This patch was
omitted from [078dbff04a95a001] apparently because I made the edit to
"sqlite3.c" rather than "resolve.c" where it belongs.
FossilOrigin-Name: 864772ffec4e91d8d73f9b97e6e1d7bd4e0537de19d11d30aed7eedd5b7d394a
Diffstat (limited to 'src/resolve.c')
-rw-r--r-- | src/resolve.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/resolve.c b/src/resolve.c index 720fdb760..24ec7bb46 100644 --- a/src/resolve.c +++ b/src/resolve.c @@ -433,7 +433,6 @@ static int lookupName( #endif /* SQLITE_OMIT_UPSERT */ { pExpr->y.pTab = pTab; - if( iCol<0 ) pExpr->affExpr = SQLITE_AFF_INTEGER; if( pParse->bReturning ){ eNewExprOp = TK_REGISTER; pExpr->iTable = pNC->uNC.iBaseReg + (pTab->nCol+1)*pExpr->iTable @@ -442,7 +441,9 @@ static int lookupName( pExpr->iColumn = (i16)iCol; eNewExprOp = TK_TRIGGER; #ifndef SQLITE_OMIT_TRIGGER - if( pExpr->iTable==0 ){ + if( iCol<0 ){ + pExpr->affExpr = SQLITE_AFF_INTEGER; + }else if( pExpr->iTable==0 ){ testcase( iCol==31 ); testcase( iCol==32 ); pParse->oldmask |= (iCol>=32 ? 0xffffffff : (((u32)1)<<iCol)); |