xserver: Branch 'master'

Daniel Stone daniel at fooishbar.org
Fri Nov 17 05:54:07 PST 2006


On Fri, Nov 17, 2006 at 01:44:15PM +0100, Matthias Hopf wrote:
> On Nov 14, 06 18:19:22 +0200, Daniel Stone wrote:
> > On Tue, Nov 14, 2006 at 06:33:31AM -0800, Matthias Hopf wrote:
> > >     Bug #9023: Only check mice for "mouse" or "void" if identifier is != NULL.
> > > 
> > > diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
> > > index ffdca12..c0e21dd 100644
> > > --- a/hw/xfree86/common/xf86Config.c
> > > +++ b/hw/xfree86/common/xf86Config.c
> > > @@ -1307,7 +1307,7 @@ checkCoreInputDevices(serverLayoutPtr se
> > >       * events, unless a 'void' section is found, in which case the user
> > >       * probably wants to run footless.
> > >       */
> > > -    for (i = servlayoutp->inputs; i->driver; i++) {
> > > +    for (i = servlayoutp->inputs; i->identifier && i->driver; i++) {
> > >  	if (!strcmp(i->driver, "void") || !strcmp(i->driver, "mouse")) {
> > >  	    found = 1; break;
> > >  	}
> > 
> > Hi,
> > Unfortunately this is invalid, as identifier can, in some cases, be
> > NULL.  We're much better off just always terminating that structure.
> 
> Hm. All cases I've seen so far set i->identifier explicitely to NULL at
> the end of the list.

Right, but identifier is not guaranteed to be non-NULL for valid
entries.

Cheers,
Daniel



More information about the xorg mailing list