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
This commit is contained in:
drh 2021-02-06 14:37:36 +00:00
parent 29f6a365cc
commit 8873aea390
3 changed files with 10 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C Remove\sunreachable\scode.\s\sFix\sa\sshift\sUB\sproblem\sintroduced\syesterday\nand\sdiscovered\sby\sOSSFuzz.
D 2021-02-05T17:34:47.616
C Fix\sthe\sOSSFuzz-discovered\sshift\sproblem\sfrom\stwo\sdays\sago.\s\sThis\spatch\swas\nomitted\sfrom\s[078dbff04a95a001]\sapparently\sbecause\sI\smade\sthe\sedit\sto\n"sqlite3.c"\srather\sthan\s"resolve.c"\swhere\sit\sbelongs.
D 2021-02-06T14:37:36.326
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -539,7 +539,7 @@ F src/pragma.h 8dc78ab7e9ec6ce3ded8332810a2066f1ef6267e2e03cd7356ee00276125c6cf
F src/prepare.c f288cbc35f79eb32e162de7e80a63ebe00d80e639dcfac071bee11570cbdb16f
F src/printf.c 30e92b638fac71dcd85cdea1d12ecfae354c9adee2c71e8e1ae4727cde7c91ed
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
F src/resolve.c d94f65ad822a8a4ea1eec1d192093855c097c913be617c15de5afea35449bb5e
F src/resolve.c d0a77f10614c80e0e4a1127391370ab512d78af32e87f12906673c485d5ff118
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
F src/select.c 738cb746189f721f59972993c13085fa2975c4cbfd04ba26445f3b42c81237dc
F src/shell.c.in 9ebc74e4f05cfbd0f4a36060fdaeff1da4e9af4458358722bc08c5a1ab9a0879
@ -1899,7 +1899,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P c4615eb28c3dd2d473daf104f32e60d02799f3158d9d275a899c39129cc71401
R ff024c949e3f9255ec1e795290e75e4c
P 078dbff04a95a001bbd8690ab08038fbb5506899df8290991b53fd1122a4c30c
R e6748b9d1b630db8f8b3410473bbf7b2
U drh
Z 12f6db35869c69dae1575bf57bae19b1
Z 80bacc1d0dff416297cd42e4085d2a09

View File

@ -1 +1 @@
078dbff04a95a001bbd8690ab08038fbb5506899df8290991b53fd1122a4c30c
864772ffec4e91d8d73f9b97e6e1d7bd4e0537de19d11d30aed7eedd5b7d394a

View File

@ -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));