summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJi Luo <ji.luo@nxp.com>2020-08-03 19:17:09 +0800
committerJi Luo <ji.luo@nxp.com>2020-08-06 11:41:57 +0800
commit3a332c5264b1cdb5aa026bcb6fd4afad69c0d19b (patch)
tree2b8382d4bc09377af68026489a95df870eadd1f8 /lib
parent0c408158af2592f34ed4ecc7c6a30db5c8676ffe (diff)
LF-1846 avb: Fix unintentional integer overflow
Fix Coverity Issue 2690361. Fix unintentional integer overflow by casting the pte->length to type 'uint64_t'. Signed-off-by: Ji Luo <ji.luo@nxp.com> Change-Id: I4536e733c82cb31bbd7da0ee916e7698850c3b81
Diffstat (limited to 'lib')
-rw-r--r--lib/avb/fsl/fsl_avb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/avb/fsl/fsl_avb.c b/lib/avb/fsl/fsl_avb.c
index 4ee7adfbfc..fc67e949af 100644
--- a/lib/avb/fsl/fsl_avb.c
+++ b/lib/avb/fsl/fsl_avb.c
@@ -409,7 +409,7 @@ AvbIOResult fsl_get_size_of_partition(AvbOps* ops,
fastboot_flash_dump_ptn();
return AVB_IO_RESULT_ERROR_NO_SUCH_PARTITION;
}
- *out_size_num_bytes = (uint64_t)(pte->length * 512);
+ *out_size_num_bytes = (uint64_t)(pte->length) * 512;
return AVB_IO_RESULT_OK;
}