mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Added some asserts and a check for a null pointer dereference. (CVS 6337)
FossilOrigin-Name: 6b0cabd017ed25530b2d918d2c069fcbdd60a3f6
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
** This file contains code use to implement APIs that are part of the
|
||||
** VDBE.
|
||||
**
|
||||
** $Id: vdbeapi.c,v 1.152 2009/02/19 14:39:25 danielk1977 Exp $
|
||||
** $Id: vdbeapi.c,v 1.153 2009/03/05 04:23:47 shane Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "vdbeInt.h"
|
||||
@@ -710,7 +710,7 @@ failed:
|
||||
** context.
|
||||
*/
|
||||
int sqlite3_aggregate_count(sqlite3_context *p){
|
||||
assert( p && p->pFunc && p->pFunc->xStep );
|
||||
assert( p && p->pMem && p->pFunc && p->pFunc->xStep );
|
||||
return p->pMem->n;
|
||||
}
|
||||
#endif
|
||||
@@ -753,7 +753,7 @@ static Mem *columnMem(sqlite3_stmt *pStmt, int i){
|
||||
}else{
|
||||
/* ((double)0) In case of SQLITE_OMIT_FLOATING_POINT... */
|
||||
static const Mem nullMem = {{0}, (double)0, 0, "", 0, MEM_Null, SQLITE_NULL, 0, 0, 0 };
|
||||
if( pVm->db ){
|
||||
if( pVm && pVm->db ){
|
||||
sqlite3_mutex_enter(pVm->db->mutex);
|
||||
sqlite3Error(pVm->db, SQLITE_RANGE, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user