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

When sqlite3VdbeAddOp() fails due to an OOM fault, return an address of 1

rather than zero so that there appears to always be a prior instruction.
This prevents a negative jump-to address computation in where.c following
an OOM fault. (CVS 6822)

FossilOrigin-Name: fe02339cb2f61c1e8a356e2d0ce9c3aef6e6cd8d
This commit is contained in:
drh
2009-06-26 14:04:51 +00:00
parent 31559aee71
commit c42ed16e5c
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.465 2009/06/26 12:15:23 drh Exp $
** $Id: vdbeaux.c,v 1.466 2009/06/26 14:04:51 drh Exp $
*/
#include "sqliteInt.h"
#include "vdbeInt.h"
@@ -145,7 +145,7 @@ int sqlite3VdbeAddOp3(Vdbe *p, int op, int p1, int p2, int p3){
assert( op>0 && op<0xff );
if( p->nOpAlloc<=i ){
if( growOpArray(p) ){
return 0;
return 1;
}
}
p->nOp++;