[U-Boot] part: check each variable for capability calculation
Tom Rini
trini at ti.com
Fri Dec 7 16:49:31 CET 2012
On Tue, Nov 06, 2012 at 03:33:12PM -0000, Jerry Huang wrote:
> From: Jerry Huang <Chang-Ming.Huang at freescale.com>
>
> In order to calculate the capability, we use the below expression to check:
> ((dev_desc->lba * dev_desc->blksz)>0L)
> If the capability is greater than 4GB (e.g. 8GB = 8 * 1024 * 104 * 1024),
> the result will overflow, the low 32bit may be zero.
>
> Therefore, change to check each variable to fix this potential issue.
>
> Signed-off-by: Jerry Huang <Chang-Ming.Huang at freescale.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121207/a527f3d7/attachment.pgp>
More information about the U-Boot
mailing list