lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20141025123939.GW28215@lug-owl.de>
Date:	Sat, 25 Oct 2014 14:39:40 +0200
From:	Jan-Benedict Glaw <jbglaw@...-owl.de>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Input: vsxxxaa - fix code dropping bytes from queue

On Fri, 2014-10-24 15:38:46 -0700, Dmitry Torokhov <dmitry.torokhov@...il.com> wrote:
> I believe the intent of the code was to drop oldest bytes from the queue,
> not the latest if we drop one byte and both latest and some oldest of we
> are dropping more than one.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
> ---
>  drivers/input/mouse/vsxxxaa.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/mouse/vsxxxaa.c b/drivers/input/mouse/vsxxxaa.c
> index 3829823..abd4944 100644
> --- a/drivers/input/mouse/vsxxxaa.c
> +++ b/drivers/input/mouse/vsxxxaa.c
> @@ -128,7 +128,7 @@ static void vsxxxaa_drop_bytes(struct vsxxxaa *mouse, int num)
>  	if (num >= mouse->count) {
>  		mouse->count = 0;
>  	} else {
> -		memmove(mouse->buf, mouse->buf + num - 1, BUFLEN - num);
> +		memmove(mouse->buf, mouse->buf + num, BUFLEN - num);
>  		mouse->count -= num;
>  	}
>  }

Good catch!  I fucked up the error recovery path.

Acked-by: Jan-Benedict Glaw <jbglaw@...-owl.de>

MfG, JBG

-- 
      Jan-Benedict Glaw      jbglaw@...-owl.de              +49-172-7608481
Signature of:                     Eine Freie Meinung in einem Freien Kopf
the second  :                   für einen Freien Staat voll Freier Bürger.

Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ