Bug 13308: Verify and reject obviously broken modes.
This commit is contained in:
		
							parent
							
								
									8d0efe4c2a
								
							
						
					
					
						commit
						c6cfcd408d
					
				| 
						 | 
				
			
			@ -328,6 +328,12 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing,
 | 
			
		|||
    Mode->VSyncEnd = Mode->VSyncStart + timing->v_sync_width;
 | 
			
		||||
    Mode->VTotal = timing->v_active + timing->v_blanking;
 | 
			
		||||
 | 
			
		||||
    /* perform basic check on the detail timing */
 | 
			
		||||
    if (Mode->HSyncEnd > Mode->HTotal || Mode->VSyncEnd > Mode->VTotal) {
 | 
			
		||||
	xfree(Mode);
 | 
			
		||||
	return NULL;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    xf86SetModeDefaultName(Mode);
 | 
			
		||||
 | 
			
		||||
    /* We ignore h/v_size and h/v_border for now. */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue