1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Earlier detection and handling of OOM problems.

dbsqlfuzz 39f2963ea5559aa3a16e24e0e3cb42aac85a7371.

FossilOrigin-Name: 8d46df73132e46abb32b9dc129b6beb978d34dac3d372fb004ca283b0832d04c
This commit is contained in:
drh
2021-04-06 12:50:24 +00:00
parent e0cc26734e
commit 4c4a25727f
5 changed files with 17 additions and 12 deletions

View File

@@ -900,7 +900,11 @@ static ExprList *exprListAppendList(
sqlite3 *db = pParse->db;
Expr *pDup = sqlite3ExprDup(db, pAppend->a[i].pExpr, 0);
assert( pDup==0 || !ExprHasProperty(pDup, EP_MemToken) );
if( bIntToNull && db->mallocFailed==0 ){
if( db->mallocFailed ){
sqlite3ExprDelete(db, pDup);
break;
}
if( bIntToNull ){
int iDummy;
Expr *pSub;
for(pSub=pDup; ExprHasProperty(pSub, EP_Skip); pSub=pSub->pLeft){