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: <1245143735.21421.94.camel@vega.slimlogic.co.uk>
Date:	Tue, 16 Jun 2009 10:15:35 +0100
From:	Liam Girdwood <lrg@...mlogic.co.uk>
To:	Roel Kluin <roel.kluin@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] regulator: add check index of wm8350->pmic.pdev[]

On Mon, 2009-06-15 at 22:30 +0200, Roel Kluin wrote:
> Ensure that reg is within the bounds of array wm8350->pmic.pdev[].
> 
> Signed-off-by: Roel Kluin <roel.kluin@...il.com>
> ---
> diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c
> index 771eca1..c806259 100644
> --- a/drivers/regulator/wm8350-regulator.c
> +++ b/drivers/regulator/wm8350-regulator.c
> @@ -1419,6 +1419,8 @@ int wm8350_register_regulator(struct wm8350 *wm8350, int reg,
>  {
>  	struct platform_device *pdev;
>  	int ret;
> +	if (reg < 0 || reg >= NUM_WM8350_REGULATORS)
> +		return -EINVAL;
>  
>  	if (wm8350->pmic.pdev[reg])
>  		return -EBUSY;

Applied.

Thanks.

Liam

--
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