1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Ensure that the Expr objects that describe indexed expressions are not modified

by code generation.  Fix for an assert() problem found by Jon Metzman using AFL.

FossilOrigin-Name: 34073ce87d88a02313217023ae92e15939192cd9
This commit is contained in:
drh
2015-12-21 15:22:13 +00:00
parent d319b8c143
commit 1c75c9d7f1
6 changed files with 42 additions and 13 deletions

View File

@@ -1408,7 +1408,7 @@ void sqlite3GenerateConstraintChecks(
int x;
if( iField==XN_EXPR ){
pParse->ckBase = regNewData+1;
sqlite3ExprCode(pParse, pIdx->aColExpr->a[i].pExpr, regIdx+i);
sqlite3ExprCodeCopy(pParse, pIdx->aColExpr->a[i].pExpr, regIdx+i);
pParse->ckBase = 0;
VdbeComment((v, "%s column %d", pIdx->zName, i));
}else{