aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2008-11-04 14:25:06 +0000
committerdrh <drh@noemail.net>2008-11-04 14:25:06 +0000
commitc46f52034f79518ededba546ac253a3125d59d0d (patch)
tree05a11752f7f1b9ac8e69d38460e5c03dcc2048be /src
parent4413d0e97677aa8984ee7236772adefc42ef0ef3 (diff)
downloadsqlite-c46f52034f79518ededba546ac253a3125d59d0d.tar.gz
sqlite-c46f52034f79518ededba546ac253a3125d59d0d.zip
Avoid a segfault when OOM on a simple EXPLAIN query. Ticket #3478. (CVS 5860)
FossilOrigin-Name: acf26cc0f77b3a308d86f6dc02ecda66a4b12fd0
Diffstat (limited to 'src')
-rw-r--r--src/vdbeaux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c
index 04d400614..adb3e4b03 100644
--- a/src/vdbeaux.c
+++ b/src/vdbeaux.c
@@ -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.415 2008/11/03 20:55:07 drh Exp $
+** $Id: vdbeaux.c,v 1.416 2008/11/04 14:25:06 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -1038,7 +1038,7 @@ void sqlite3VdbeMakeReady(
/*resizeOpArray(p, p->nOp);*/
assert( nVar>=0 );
if( isExplain && nMem<10 ){
- p->nMem = nMem = 10;
+ nMem = 10;
}
p->aMem = sqlite3DbMallocZero(db,
nMem*sizeof(Mem) /* aMem */