summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorfaqiang.zhu <faqiang.zhu@nxp.com>2020-10-14 19:50:10 +0800
committerJi Luo <ji.luo@nxp.com>2022-04-18 16:40:09 +0800
commit26964152b3d1a254cf448f86839c30d609fb62dd (patch)
tree5f536163b10f42855d47efddd90b4787d29a9cb2 /include
parent6c9550d1406108879b786fd58f610f213d7a20ca (diff)
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) (cherry picked from commit 900872464c2d8cb1862ac1d2a413d631bce64213)
Diffstat (limited to 'include')
-rw-r--r--include/fb_fsl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/fb_fsl.h b/include/fb_fsl.h
index b6308b88d5..3c551afcb8 100644
--- a/include/fb_fsl.h
+++ b/include/fb_fsl.h
@@ -167,7 +167,7 @@ struct fastboot_ptentry {
/* The start wrt the nand part, must be multiple of nand block size */
unsigned int start;
/* The length of the partition, must be multiple of nand block size */
- unsigned int length;
+ unsigned long length;
/* Controls the details of how operations are done on the partition
See the FASTBOOT_PTENTRY_FLAGS_*'s defined below */
unsigned int flags;