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

Fix a possible null pointer deref following OOM. Discovered by dbsqlfuzz.

FossilOrigin-Name: cc888878ea8d5bc754c69de523819d32d6d9853857e31d7287f9dbfd723428db
This commit is contained in:
drh
2020-06-26 04:34:28 +00:00
parent 0f40e8dd41
commit d8d335d737
4 changed files with 11 additions and 7 deletions

View File

@@ -4270,7 +4270,9 @@ expr_code_doover:
int nCol;
testcase( op==TK_EXISTS );
testcase( op==TK_SELECT );
if( op==TK_SELECT && (nCol = pExpr->x.pSelect->pEList->nExpr)!=1 ){
if( pParse->db->mallocFailed ){
return 0;
}else if( op==TK_SELECT && (nCol = pExpr->x.pSelect->pEList->nExpr)!=1 ){
sqlite3SubselectError(pParse, nCol, 1);
}else{
return sqlite3CodeSubselect(pParse, pExpr);