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] [thread-next>] [day] [month] [year] [list]
Message-ID: <84144f020610241142y2c86485dj898f555174803577@mail.gmail.com>
Date:	Tue, 24 Oct 2006 21:42:06 +0300
From:	"Pekka Enberg" <penberg@...helsinki.fi>
To:	"Arnd Bergmann" <arnd@...db.de>
Cc:	"Paul Mackerras" <paulus@...ba.org>, linuxppc-dev@...abs.org,
	cbe-oss-dev@...abs.org, linux-kernel@...r.kernel.org,
	"Arnd Bergmann" <arnd.bergmann@...ibm.com>
Subject: Re: [PATCH 2/3] spufs: fix another off-by-one bug in mbox_read

Hi Arnd,

On 10/24/06, Arnd Bergmann <arnd@...db.de> wrote:
>         spu_acquire(ctx);
> -       for (count = 0; count <= len; count += 4, udata++) {
> +       for (count = 0; (count + 4) <= len; count += 4, udata++) {

Wouldn't this be more obvious as

  for (count = 0, count < (len / 4); count++, udata++) {

And then do count * 4 if you need the actual index somewhere. Hmm?
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ