aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2019-12-22 20:29:25 +0000
committerdrh <drh@noemail.net>2019-12-22 20:29:25 +0000
commit5d762b2d1d5abc0fe8f438ee7e588bb29f830ab8 (patch)
tree2684243d88bcc7908c2f3f7e4b6add8e2388afd0 /src/expr.c
parent6e827fa27de5aa52bff6067e8051f01c019e5d27 (diff)
downloadsqlite-5d762b2d1d5abc0fe8f438ee7e588bb29f830ab8.tar.gz
sqlite-5d762b2d1d5abc0fe8f438ee7e588bb29f830ab8.zip
Make a hard copy of strings in constraint checks prior to applying
OP_RealAffinity, to avoid problems with a pointer accounting assert. This change is not strictly necessary - the correct answer is obtained without it and no UB occurs - however the pointer accounting asserts are useful to prevent other problems so it is a simple matter to bring this piece into compliance. Ticket [5ad2aa6921faa1ee] FossilOrigin-Name: 89a9dad6330270a4c3b962f86a208088d2ea9883c7d291351a77f058e0ed8b0c
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c
index 9603ff45e..1536c5073 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -3674,7 +3674,7 @@ expr_code_doover:
}else
#endif /* SQLITE_OMIT_GENERATED_COLUMNS */
if( pCol->affinity==SQLITE_AFF_REAL ){
- sqlite3VdbeAddOp2(v, OP_SCopy, iSrc, target);
+ sqlite3VdbeAddOp2(v, OP_Copy, iSrc, target);
sqlite3VdbeAddOp1(v, OP_RealAffinity, target);
return target;
}else{