Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754044Ab1BFU7U (ORCPT ); Sun, 6 Feb 2011 15:59:20 -0500 Received: from lobo.ruivo.org ([173.14.175.98]:36245 "EHLO lobo.ruivo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753775Ab1BFU7T (ORCPT ); Sun, 6 Feb 2011 15:59:19 -0500 Date: Sun, 6 Feb 2011 12:23:17 -0500 From: Aristeu Rozanski To: David Herrmann Cc: linux-kernel@vger.kernel.org, dmitry.torokhov@gmail.com Subject: Re: [PATCH] uinput strnlen bugfix Message-ID: <20110206172317.GI22170@cathedrallabs.org> References: <20110206165524.GG22170@cathedrallabs.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1011 Lines: 36 On Sun, Feb 06, 2011 at 05:57:19PM +0100, David Herrmann wrote: > On Sun, Feb 6, 2011 at 5:55 PM, Aristeu Rozanski 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 -- Aristeu -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/