1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Fix a critical bug in the VDBE opcode array resizer introduced by

check-in (6307).  Bug detected by regression testing. (CVS 6330)

FossilOrigin-Name: ec3b18acaecabae6eb04eda006870e602faacb8c
This commit is contained in:
drh
2009-03-01 19:42:11 +00:00
parent 2f886d1d53
commit b45f65db8f
3 changed files with 10 additions and 10 deletions

View File

@@ -14,7 +14,7 @@
** to version 2.8.7, all this code was combined into the vdbe.c source file.
** But that file was getting too big so this subroutines were split out.
**
** $Id: vdbeaux.c,v 1.438 2009/02/20 10:58:42 danielk1977 Exp $
** $Id: vdbeaux.c,v 1.439 2009/03/01 19:42:11 drh Exp $
*/
#include "sqliteInt.h"
#include "vdbeInt.h"
@@ -114,7 +114,7 @@ static int growOpArray(Vdbe *p){
int nNew = (p->nOpAlloc ? p->nOpAlloc*2 : (int)(1024/sizeof(Op)));
pNew = sqlite3DbRealloc(p->db, p->aOp, nNew*sizeof(Op));
if( pNew ){
p->nOpAlloc = sqlite3MallocSize(pNew)/sizeof(Op);
p->nOpAlloc = sqlite3DbMallocSize(p->db, pNew)/sizeof(Op);
p->aOp = pNew;
}
return (pNew ? SQLITE_OK : SQLITE_NOMEM);