diff options
author | Adam Jackson <ajax@redhat.com> | 2010-11-30 13:50:42 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2010-11-30 13:50:42 -0500 |
commit | a861fe6a1cf56df76928d21707551602289963c1 (patch) | |
tree | 7bef9e61d28c2851045f439bb75f216203446682 /hw/xfree86/vbe/vbe.c | |
parent | 84a14fab8f930ef1855444ae4e9e3e14ee008328 (diff) |
vbe: Refuse to believe tiny (or negative) panel sizes from PanelID
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'hw/xfree86/vbe/vbe.c')
-rw-r--r-- | hw/xfree86/vbe/vbe.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c index 7a64a4a71..bcda5ec35 100644 --- a/hw/xfree86/vbe/vbe.c +++ b/hw/xfree86/vbe/vbe.c @@ -1028,6 +1028,11 @@ VBEInterpretPanelID(int scrnIndex, struct vbePanelID *data) if (pScrn->monitor->nHsync || pScrn->monitor->nVrefresh) return; + if (data->hsize < 320 || data->vsize < 240) { + xf86DrvMsg(scrnIndex, X_INFO, "...which I refuse to believe\n"); + return; + } + mode = xf86CVTMode(data->hsize, data->vsize, PANEL_HZ, 1, 0); pScrn->monitor->nHsync = 1; |