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

Improved assert() statements on the OP_Column opcode.

FossilOrigin-Name: c538601e4c979ee59f18d19e6eb6296cebfa580fb029a18d5a3f0dd9393acb75
This commit is contained in:
drh
2019-12-20 14:37:56 +00:00
parent 40e9c8328e
commit 8c7715d1cc
3 changed files with 9 additions and 8 deletions

View File

@@ -2549,7 +2549,9 @@ case OP_Column: {
u32 t; /* A type code from the record header */
Mem *pReg; /* PseudoTable input register */
assert( pOp->p1>=0 && pOp->p1<p->nCursor );
pC = p->apCsr[pOp->p1];
assert( pC!=0 );
p2 = pOp->p2;
/* If the cursor cache is stale (meaning it is not currently point at
@@ -2561,7 +2563,6 @@ case OP_Column: {
assert( pOp->p3>0 && pOp->p3<=(p->nMem+1 - p->nCursor) );
pDest = &aMem[pOp->p3];
memAboutToChange(p, pDest);
assert( pOp->p1>=0 && pOp->p1<p->nCursor );
assert( pC!=0 );
assert( p2<pC->nField );
aOffset = pC->aOffset;