mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Fix segfaults that can occur if a malloc failure happens just before
a built-in function calls sqlite3_value_text(). (CVS 3874) FossilOrigin-Name: 9cb0ed6ee9827bc6884a0195044d5b6ad0de698e
This commit is contained in:
@@ -443,7 +443,7 @@ static Mem *columnMem(sqlite3_stmt *pStmt, int i){
|
||||
Vdbe *pVm = (Vdbe *)pStmt;
|
||||
int vals = sqlite3_data_count(pStmt);
|
||||
if( i>=vals || i<0 ){
|
||||
static const Mem nullMem = {{0}, 0.0, "", 0, MEM_Null, MEM_Null };
|
||||
static const Mem nullMem = {{0}, 0.0, "", 0, MEM_Null, SQLITE_NULL };
|
||||
sqlite3Error(pVm->db, SQLITE_RANGE, 0);
|
||||
return (Mem*)&nullMem;
|
||||
}
|
||||
|
Reference in New Issue
Block a user