diff options
author | drh <drh@noemail.net> | 2017-03-17 22:50:16 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2017-03-17 22:50:16 +0000 |
commit | 1cb0266dcb290384be714fca64710ce3035fb096 (patch) | |
tree | 5539114baebbb27413f0a1c029c2f9d1155a537b /src/vdbeaux.c | |
parent | f53524b4f72be7e7cf96fdec983000c9e4c5a85a (diff) | |
download | sqlite-1cb0266dcb290384be714fca64710ce3035fb096.tar.gz sqlite-1cb0266dcb290384be714fca64710ce3035fb096.zip |
Begin enforcing the SQLITE_LIMIT_VDBE_OP. The documentation warned that this
day might come.
FossilOrigin-Name: ef5914617088cbf89bfae88f63ea959a07f02dff387ddc2b43948ad99c6a97b8
Diffstat (limited to 'src/vdbeaux.c')
-rw-r--r-- | src/vdbeaux.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c index ab4aad7a0..a8f215420 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -117,6 +117,12 @@ static int growOpArray(Vdbe *v, int nOp){ UNUSED_PARAMETER(nOp); #endif + /* Ensure that the size of a VDBE does not grow too large */ + if( nNew > p->db->aLimit[SQLITE_LIMIT_VDBE_OP] ){ + sqlite3OomFault(p->db); + return SQLITE_NOMEM; + } + assert( nOp<=(1024/sizeof(Op)) ); assert( nNew>=(p->nOpAlloc+nOp) ); pNew = sqlite3DbRealloc(p->db, v->aOp, nNew*sizeof(Op)); |