From: Takashi Iwai <tiwai@suse.de>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: alsa-devel@alsa-project.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] ALSA: Read buffer overflow
Date: Mon, 03 Aug 2009 08:51:38 +0200 [thread overview]
Message-ID: <s5htz0p8k5h.wl%tiwai@suse.de> (raw)
In-Reply-To: <4A7578E5.4070406@gmail.com>
At Sun, 02 Aug 2009 13:30:45 +0200,
Roel Kluin wrote:
>
> Check whether index is within bounds before testing the element.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Applied now. Thanks.
Takashi
> ---
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index 8c8b273..45e0ee0 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -559,7 +559,7 @@ static int alc_pin_mode_get(struct snd_kcontrol *kcontrol,
>
> /* Find enumerated value for current pinctl setting */
> i = alc_pin_mode_min(dir);
> - while (alc_pin_mode_values[i] != pinctl && i <= alc_pin_mode_max(dir))
> + while (i <= alc_pin_mode_max(dir) && alc_pin_mode_values[i] != pinctl)
> i++;
> *valp = i <= alc_pin_mode_max(dir) ? i: alc_pin_mode_min(dir);
> return 0;
>
prev parent reply other threads:[~2009-08-03 6:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-02 11:30 [PATCH] ALSA: Read buffer overflow Roel Kluin
2009-08-03 6:51 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5htz0p8k5h.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alsa-devel@alsa-project.org \
--cc=roel.kluin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox