1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-03 16:53:36 +03:00

Begin enforcing the SQLITE_LIMIT_VDBE_OP. The documentation warned that this

day might come.

FossilOrigin-Name: ef5914617088cbf89bfae88f63ea959a07f02dff387ddc2b43948ad99c6a97b8
This commit is contained in:
drh
2017-03-17 22:50:16 +00:00
parent f53524b4f7
commit 1cb0266dcb
5 changed files with 21 additions and 13 deletions

View File

@@ -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));