]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
part: check each variable for capability calculation
authorJerry Huang <Chang-Ming.Huang@freescale.com>
Tue, 6 Nov 2012 15:33:12 +0000 (15:33 +0000)
committerTom Rini <trini@ti.com>
Thu, 6 Dec 2012 20:56:39 +0000 (13:56 -0700)
commit33699df12cbcd9bfa609dc7fb5a0a69c029449e9
tree38c47b1880aa925434df5875cb85342bb978e4fe
parente3ff797cdb3c4e4b2147013fa1b25a04ecc21fc4
part: check each variable for capability calculation

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@freescale.com>
disk/part.c