mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Avoid a segfault when OOM on a simple EXPLAIN query. Ticket #3478. (CVS 5860)
FossilOrigin-Name: acf26cc0f77b3a308d86f6dc02ecda66a4b12fd0
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user