1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Additional steps to make sure calls to sqlite3ExprToRegister() are sane.

FossilOrigin-Name: 1c42d7176b228791f99bc9971d92a9ab67b1e2956ca4f8d934bd1a3e596d6c80
This commit is contained in:
drh
2024-06-28 18:07:10 +00:00
parent 076bd5758b
commit f13e2d22fe
3 changed files with 15 additions and 11 deletions

View File

@@ -4270,10 +4270,14 @@ void sqlite3ExprCodeMove(Parse *pParse, int iFrom, int iTo, int nReg){
void sqlite3ExprToRegister(Expr *pExpr, int iReg){
Expr *p = sqlite3ExprSkipCollateAndLikely(pExpr);
if( NEVER(p==0) ) return;
p->op2 = p->op;
p->op = TK_REGISTER;
p->iTable = iReg;
ExprClearProperty(p, EP_Skip);
if( p->op==TK_REGISTER ){
assert( p->iTable==iReg );
}else{
p->op2 = p->op;
p->op = TK_REGISTER;
p->iTable = iReg;
ExprClearProperty(p, EP_Skip);
}
}
/*