mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Fix an obscure memory leak found by libfuzzer that may occur under some circumstances if expanding a "*" expression causes a SELECT to return more than 32767 columns.
FossilOrigin-Name: 60de5f23424552c98aa760ac89149a3d51f895be
This commit is contained in:
@@ -1613,6 +1613,7 @@ int sqlite3ColumnsFromExprList(
|
||||
nCol = 0;
|
||||
aCol = 0;
|
||||
}
|
||||
assert( nCol==(i16)nCol );
|
||||
*pnCol = nCol;
|
||||
*paCol = aCol;
|
||||
|
||||
@@ -4455,6 +4456,7 @@ static int selectExpander(Walker *pWalker, Select *p){
|
||||
#if SQLITE_MAX_COLUMN
|
||||
if( p->pEList && p->pEList->nExpr>db->aLimit[SQLITE_LIMIT_COLUMN] ){
|
||||
sqlite3ErrorMsg(pParse, "too many columns in result set");
|
||||
return WRC_Abort;
|
||||
}
|
||||
#endif
|
||||
return WRC_Continue;
|
||||
|
||||
Reference in New Issue
Block a user