diff options
author | drh <> | 2024-03-22 10:32:14 +0000 |
---|---|---|
committer | drh <> | 2024-03-22 10:32:14 +0000 |
commit | 378bf82e2bc09734b8c5869f9b148efe37d29527 (patch) | |
tree | 3dc00c03fc929b8593898c185c95267227b4ea61 /src | |
parent | 2faaf3830efc93db406d6a58c837ad87f49e95db (diff) | |
download | sqlite-378bf82e2bc09734b8c5869f9b148efe37d29527.tar.gz sqlite-378bf82e2bc09734b8c5869f9b148efe37d29527.zip |
Fix incorrect boundary assert()s on the new OP_IfSizeBetween opcode.
FossilOrigin-Name: 8eda4797c573382cbb989a4ab4b1f19d8fd538dbc9818d86a9aa6189cfa90f37
Diffstat (limited to 'src')
-rw-r--r-- | src/vdbe.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vdbe.c b/src/vdbe.c index faa12aaf8..ed1d277b2 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -6192,7 +6192,8 @@ case OP_Last: { /* jump0, ncycle */ ** ** Let N be the approximate number of rows in the table or index ** with cursor P1 and let X be 10*log2(N) if N is positive or -1 -** if N is zero. Thus X will be within the range of -1 to 640, inclusive +** if N is zero. +** ** Jump to P2 if X is in between P3 and P4, inclusive. */ case OP_IfSizeBetween: { /* jump */ @@ -6203,8 +6204,8 @@ case OP_IfSizeBetween: { /* jump */ assert( pOp->p1>=0 && pOp->p1<p->nCursor ); assert( pOp->p4type==P4_INT32 ); - assert( pOp->p3>=-1 && pOp->p3<=640 ); - assert( pOp->p4.i>=-1 && pOp->p4.i<=640 ); + assert( pOp->p3>=-1 && pOp->p3<=640*2 ); + assert( pOp->p4.i>=-1 && pOp->p4.i<=640*2 ); pC = p->apCsr[pOp->p1]; assert( pC!=0 ); pCrsr = pC->uc.pCursor; |