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: <s5h4onbuyaj.wl%tiwai@suse.de>
Date:	Mon, 28 Dec 2009 12:35:00 +0100
From:	Takashi Iwai <tiwai@...e.de>
To:	Roel Kluin <roel.kluin@...il.com>
Cc:	Jaroslav Kysela <perex@...ex.cz>, alsa-devel@...a-project.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ALSA: test off by one in setsamplerate()

At Sun, 27 Dec 2009 22:26:47 +0100,
Roel Kluin wrote:
> 
> With `while (i++ < MAX_WRITE_RETRY)' i reaches MAX_WRITE_RETRY + 1 after the loop
> 
> Signed-off-by: Roel Kluin <roel.kluin@...il.com>

Applied now.  Thanks.


Takashi

> ---
>  sound/pci/riptide/riptide.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c
> index b5ca02e..e66ef2b 100644
> --- a/sound/pci/riptide/riptide.c
> +++ b/sound/pci/riptide/riptide.c
> @@ -1058,7 +1058,7 @@ setsamplerate(struct cmdif *cif, unsigned char *intdec, unsigned int rate)
>  				 rptr.retwords[2] != M &&
>  				 rptr.retwords[3] != N &&
>  				 i++ < MAX_WRITE_RETRY);
> -			if (i == MAX_WRITE_RETRY) {
> +			if (i > MAX_WRITE_RETRY) {
>  				snd_printdd("sent samplerate %d: %d failed\n",
>  					    *intdec, rate);
>  				return -EIO;
> 
--
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