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

Fix an out-of-memory NULL pointer defer in the code generator. Ticket #2843. (CVS 4630)

FossilOrigin-Name: b821b6ed176b4259e1d4b56c8eb548933b6f530a
This commit is contained in:
drh
2007-12-14 15:12:21 +00:00
parent 85b623f2f9
commit 49df6b749c
5 changed files with 28 additions and 13 deletions

View File

@@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** to handle INSERT statements in SQLite.
**
** $Id: insert.c,v 1.195 2007/12/12 17:42:53 danielk1977 Exp $
** $Id: insert.c,v 1.196 2007/12/14 15:12:21 drh Exp $
*/
#include "sqliteInt.h"
@@ -110,6 +110,7 @@ static int readsTable(Vdbe *v, int iStartAddr, int iDb, Table *pTab){
int iEnd = sqlite3VdbeCurrentAddr(v);
for(i=iStartAddr; i<iEnd; i++){
VdbeOp *pOp = sqlite3VdbeGetOp(v, i);
assert( pOp==0 );
if( pOp->opcode==OP_OpenRead ){
VdbeOp *pPrior = &pOp[-1];
int tnum = pOp->p2;