[PATCH] vbe: Refuse to believe tiny (or negative) panel sizes from PanelID

Peter Hutterer peter.hutterer at who-t.net
Tue Nov 23 14:31:38 PST 2010


On Tue, Nov 23, 2010 at 05:16:07PM -0500, Adam Jackson wrote:
> Signed-off-by: Adam Jackson <ajax at redhat.com>
> ---
>  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 0b34648..1defd9a 100644
> --- a/hw/xfree86/vbe/vbe.c
> +++ b/hw/xfree86/vbe/vbe.c
> @@ -1088,6 +1088,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;
> -- 
> 1.7.2.2

Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>



More information about the xorg-devel mailing list