1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Fix a segfault that could occur following an OOM error in the

flattenSubquery() routine.

FossilOrigin-Name: c6dda3f752c184f441624c9993e77d5031063d79a0e177b6e25a9886514a742e
This commit is contained in:
dan
2017-03-13 14:30:40 +00:00
parent bbc0177460
commit c3becddb75
4 changed files with 44 additions and 9 deletions

View File

@@ -3749,7 +3749,9 @@ static int flattenSubquery(
}else{
pParent->pWhere = sqlite3ExprAnd(db, pWhere, pParent->pWhere);
}
substSelect(pParse, pParent, iParent, pSub->pEList, 0);
if( db->mallocFailed==0 ){
substSelect(pParse, pParent, iParent, pSub->pEList, 0);
}
/* The flattened query is distinct if either the inner or the
** outer query is distinct.