[PATCH] VidMode: prevent crash with no modes

Pauli Nieminen ext-pauli.nieminen at nokia.com
Tue Jan 25 04:29:06 PST 2011


On 25/01/11 12:14 +0000, ext Chris Wilson wrote:
> On Tue, 25 Jan 2011 13:31:55 +0200, Pauli Nieminen <ext-pauli.nieminen at nokia.com> wrote:
> > >      pScrn = xf86Screens[scrnIndex];
> > > +    if (pScrn->modes == NULL)
> > > +	    return FALSE;
> > > +
> > 
> > Should we check for missing pScrn->modes in VidModeAvailable?
> 
> I interpreted that as 'is the VidMode extension enabled for this screen?'
> Which is obviously a separate question from whether there are any modes
> available.

Right. In that case patch is correct.

But there is at least one other place with same bug. The function is
VidModeAddModeline.

Acked-by: Pauli Nieminen <ext-pauli.nieminen at nokia.com>

> -Chris
> 
> -- 
> Chris Wilson, Intel Open Source Technology Centre


More information about the xorg-devel mailing list