[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110206172317.GI22170@cathedrallabs.org>
Date:	Sun, 6 Feb 2011 12:23:17 -0500
From:	Aristeu Rozanski <aris@...hedrallabs.org>
To:	David Herrmann <dh.herrmann@...glemail.com>
Cc:	linux-kernel@...r.kernel.org, dmitry.torokhov@...il.com
Subject: Re: [PATCH] uinput strnlen bugfix
On Sun, Feb 06, 2011 at 05:57:19PM +0100, David Herrmann wrote:
> On Sun, Feb 6, 2011 at 5:55 PM, Aristeu Rozanski <aris@...hedrallabs.org> wrote:
> > and where's the patch? :^)
> >
> > --
> > Aristeu
> >
> 
> ah, embarrasing.., sorry.
> I attached the patchfile.
> 
> David
> --- old/drivers/input/misc/uinput.c	2011-02-06 17:40:24.951454656 +0100
> +++ new/drivers/input/misc/uinput.c	2011-02-06 17:41:16.747454654 +0100
> @@ -372,8 +372,8 @@
>  
>  	udev->ff_effects_max = user_dev->ff_effects_max;
>  
> -	size = strnlen(user_dev->name, UINPUT_MAX_NAME_SIZE) + 1;
> -	if (!size) {
> +	size = strnlen(user_dev->name, UINPUT_MAX_NAME_SIZE);
> +	if (!size++) {
>  		retval = -EINVAL;
>  		goto exit;
>  	}
Acked-by: Aristeu Rozanski <aris@...vo.org>
-- 
Aristeu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists