CheckPassiveGrabsOnWindow() needs to handle NULL return value from AllocGrab()
CheckPassiveGrabsOnWindow() calls AllocGrab() which can fail and return NULL. This return value is not checked, and can cause NULL pointer dereferences. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
		
							parent
							
								
									5493a67ec2
								
							
						
					
					
						commit
						863d2ad5c0
					
				| 
						 | 
				
			
			@ -3956,6 +3956,8 @@ CheckPassiveGrabsOnWindow(WindowPtr pWin,
 | 
			
		|||
        return NULL;
 | 
			
		||||
 | 
			
		||||
    tempGrab = AllocGrab(NULL);
 | 
			
		||||
    if (tempGrab == NULL)
 | 
			
		||||
        return NULL;
 | 
			
		||||
 | 
			
		||||
    /* Fill out the grab details, but leave the type for later before
 | 
			
		||||
     * comparing */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue