mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Fix a potential NULL pointer dereference on a RENAME TABLE that references
a VIEW with a logic error in a window function in the ORDER BY clause. FossilOrigin-Name: 0adb273f7e7671efb0e0a1619887e369500dfd2db7ef1b1e125c2414ea96e96f
This commit is contained in:
@@ -1244,8 +1244,8 @@ void sqlite3WindowAttach(Parse *pParse, Expr *p, Window *pWin){
|
||||
** SELECT, or (b) the windows already linked use a compatible window frame.
|
||||
*/
|
||||
void sqlite3WindowLink(Select *pSel, Window *pWin){
|
||||
if( 0==pSel->pWin
|
||||
|| 0==sqlite3WindowCompare(0, pSel->pWin, pWin, 0)
|
||||
if( pSel!=0
|
||||
&& (0==pSel->pWin || 0==sqlite3WindowCompare(0, pSel->pWin, pWin, 0))
|
||||
){
|
||||
pWin->pNextWin = pSel->pWin;
|
||||
if( pSel->pWin ){
|
||||
|
Reference in New Issue
Block a user