Commit c6cfcd40 authored by Hong Liu's avatar Hong Liu Committed by Matthias Hopf

Bug 13308: Verify and reject obviously broken modes.

parent 8d0efe4c
......@@ -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. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment