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: <5159BAA6.50706@wwwdotorg.org>
Date:	Mon, 01 Apr 2013 10:49:42 -0600
From:	Stephen Warren <swarren@...dotorg.org>
To:	Tony Prisk <linux@...sktech.co.nz>
CC:	Linus Walleij <linus.walleij@...aro.org>,
	linux-arm-kernel@...ts.infradead.org,
	vt8500-wm8505-linux-kernel@...glegroups.com, arnd@...db.de,
	olof@...om.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCHv3 1/6] of: Add support for reading a u32 from a multi-value
 property.

On 03/28/2013 12:10 AM, Tony Prisk wrote:
> This patch adds an of_property_read_u32_index() function to allow
> reading a single indexed u32 value from a property containing multiple
> u32 values.

> diff --git a/drivers/of/base.c b/drivers/of/base.c

> +int of_property_read_u32_index(const struct device_node *np,

> +	if ((index * sizeof(*out_value)) > prop->length)
> +		return -EOVERFLOW;

I think that if should be:

	if (((index + 1) * sizeof(*out_value)) > prop->length)

since the code should check if the last byte of the u32 is out-of-range,
not whether the first byte is.

Aside from that, this patch,
Reviewed-by: Stephen Warren <swarren@...dia.com>
--
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