mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-18 10:21:03 +03:00
Improved defense against OOM errors in sqliteInitOne().
dbsqlfuzz 429db39cd5777c46479641e8637c48c62890042d FossilOrigin-Name: b6c57e0e2a9658417a0a5548e73007faa59c837b9ad87293bc216feef980717a
This commit is contained in:
@@ -377,9 +377,11 @@ int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg, u32 mFlags){
|
||||
}
|
||||
#endif
|
||||
}
|
||||
assert( pDb == &(db->aDb[iDb]) );
|
||||
if( db->mallocFailed ){
|
||||
rc = SQLITE_NOMEM_BKPT;
|
||||
sqlite3ResetAllSchemasOfConnection(db);
|
||||
pDb = &db->aDb[iDb];
|
||||
}else
|
||||
if( rc==SQLITE_OK || (db->flags&SQLITE_NoSchemaError)){
|
||||
/* Hack: If the SQLITE_NoSchemaError flag is set, then consider
|
||||
|
||||
Reference in New Issue
Block a user