xserver: Branch 'master'

Daniel Stone daniel at fooishbar.org
Tue Nov 14 08:19:22 PST 2006


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.

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20061114/2156e033/attachment.pgp>


More information about the xorg mailing list