MA-18051 avoid overflow of in partition size calculation
authorfaqiang.zhu <faqiang.zhu@nxp.com>
Wed, 14 Oct 2020 11:50:10 +0000 (19:50 +0800)
committerJi Luo <ji.luo@nxp.com>
Thu, 13 May 2021 01:49:18 +0000 (09:49 +0800)
commit900872464c2d8cb1862ac1d2a413d631bce64213
tree75be7ddd86c411dde25b5724ef5737f2c5f489a1
parent29ed198ffe8f46715a7ccee21c2eb6f1d53392a5
MA-18051 avoid overflow of in partition size calculation

If a partition is not less than 4GB, to avoid the overflow issue when
calculate the partition size in bytes, change the value of partition
length in block size to the type of "unsigned long".

Change-Id: Ifa4ddb5169fcb02822ef152a6c70d01b5d3cf50d
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
(cherry picked from commit c4e9be08d90ca59531542c97bd8fe16eab2ab099)
(cherry picked from commit 6c1471828256f5c95d3043099fcc00906726fdd3)
drivers/fastboot/fb_fsl/fb_fsl_dev.c
drivers/fastboot/fb_fsl/fb_fsl_partitions.c
include/fb_fsl.h